r3gm commited on
Commit
71e53cd
·
verified ·
1 Parent(s): 477225a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -287,8 +287,11 @@ original_scheduler = copy.deepcopy(pipe.scheduler)
287
  # print("No hub cache found.")
288
 
289
  quantize_(pipe.text_encoder, Int8WeightOnlyConfig())
 
290
  quantize_(pipe.transformer, Float8DynamicActivationFloat8WeightConfig())
 
291
  quantize_(pipe.transformer_2, Float8DynamicActivationFloat8WeightConfig())
 
292
 
293
  aoti.aoti_blocks_load(pipe.transformer, 'zerogpu-aoti/Wan2', variant='fp8da')
294
  aoti.aoti_blocks_load(pipe.transformer_2, 'zerogpu-aoti/Wan2', variant='fp8da')
@@ -394,7 +397,7 @@ def get_inference_duration(
394
 
395
  total_time = 15 + gen_time
396
  if safe_mode:
397
- total_time = total_time * 1.20
398
 
399
  return total_time
400
 
@@ -625,7 +628,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=CSS, delete_cache=(3600, 3700)) as de
625
  safe_mode_checkbox = gr.Checkbox(
626
  label="🛠️ Safe Mode",
627
  value=True,
628
- info="Safe Mode: Requests 20% extra processing time to try to prevent unfinished tasks when the server is busy."
629
  )
630
  with gr.Accordion("Advanced Settings", open=False):
631
  last_image_component = gr.Image(type="pil", label="Last Image (Optional)", sources=["upload", "clipboard"])
 
287
  # print("No hub cache found.")
288
 
289
  quantize_(pipe.text_encoder, Int8WeightOnlyConfig())
290
+ torch._dynamo.reset()
291
  quantize_(pipe.transformer, Float8DynamicActivationFloat8WeightConfig())
292
+ torch._dynamo.reset()
293
  quantize_(pipe.transformer_2, Float8DynamicActivationFloat8WeightConfig())
294
+ torch._dynamo.reset()
295
 
296
  aoti.aoti_blocks_load(pipe.transformer, 'zerogpu-aoti/Wan2', variant='fp8da')
297
  aoti.aoti_blocks_load(pipe.transformer_2, 'zerogpu-aoti/Wan2', variant='fp8da')
 
397
 
398
  total_time = 15 + gen_time
399
  if safe_mode:
400
+ total_time = total_time * 1.25
401
 
402
  return total_time
403
 
 
628
  safe_mode_checkbox = gr.Checkbox(
629
  label="🛠️ Safe Mode",
630
  value=True,
631
+ info="Safe Mode: Requests 25% extra processing time to try to prevent unfinished tasks when the server is busy."
632
  )
633
  with gr.Accordion("Advanced Settings", open=False):
634
  last_image_component = gr.Image(type="pil", label="Last Image (Optional)", sources=["upload", "clipboard"])