Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -6058,7 +6058,8 @@ def _gpu_estimate_text(input_image, duration_seconds, steps, guidance_scale,
|
|
| 6058 |
lines.append("⚠️ This video reservation exceeds the free account's full 300 s daily allowance. ")
|
| 6059 |
lines.append(
|
| 6060 |
f"<sub>{num_frames} model frames · {w}×{h} · {int(steps)} steps · "
|
| 6061 |
-
f"output {out_frames} frames @ {out_fps} fps{note}.
|
|
|
|
| 6062 |
"xlarge uses a 2× quota multiplier. Requested allowance is checked before generation; "
|
| 6063 |
"this is not a receipt for actual GPU usage. Normal mode restores smaller reservations; "
|
| 6064 |
"LoRA downloads finish on CPU before the GPU request; a size-based loading reserve is then added. "
|
|
@@ -7663,7 +7664,7 @@ with gr.Blocks(title="Wan 2.2 Studio | NEW AI Scene Planner · 64 Clips · 3 Aud
|
|
| 7663 |
clear_button = gr.Button("🧹 Clear", variant="secondary", elem_id="clear-btn")
|
| 7664 |
with gr.Row():
|
| 7665 |
gpu_estimate = gr.Markdown(
|
| 7666 |
-
|
| 7667 |
elem_classes="gpu-estimate",
|
| 7668 |
)
|
| 7669 |
gpu_estimate_btn = gr.Button("🔄", variant="secondary", scale=1, min_width=60,
|
|
@@ -8570,8 +8571,13 @@ with gr.Blocks(title="Wan 2.2 Studio | NEW AI Scene Planner · 64 Clips · 3 Aud
|
|
| 8570 |
*ui_inputs[16:53],
|
| 8571 |
guidance_scale_2_input, scheduler_dropdown, flow_shift_slider, last_image_component,
|
| 8572 |
]
|
| 8573 |
-
#
|
| 8574 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8575 |
pb_button.click(
|
| 8576 |
fn=enhance_prompt,
|
| 8577 |
inputs=[prompt_input, pb_use_model, pb_camera, pb_framing, pb_lighting, pb_pace, pb_quality],
|
|
|
|
| 6058 |
lines.append("⚠️ This video reservation exceeds the free account's full 300 s daily allowance. ")
|
| 6059 |
lines.append(
|
| 6060 |
f"<sub>{num_frames} model frames · {w}×{h} · {int(steps)} steps · "
|
| 6061 |
+
f"output {out_frames} frames @ {out_fps} fps{note}. "
|
| 6062 |
+
f"Mode: {'Safe' if safe_mode else 'Normal'}. Runtime limit: {int(secs)} s. "
|
| 6063 |
"xlarge uses a 2× quota multiplier. Requested allowance is checked before generation; "
|
| 6064 |
"this is not a receipt for actual GPU usage. Normal mode restores smaller reservations; "
|
| 6065 |
"LoRA downloads finish on CPU before the GPU request; a size-based loading reserve is then added. "
|
|
|
|
| 7664 |
clear_button = gr.Button("🧹 Clear", variant="secondary", elem_id="clear-btn")
|
| 7665 |
with gr.Row():
|
| 7666 |
gpu_estimate = gr.Markdown(
|
| 7667 |
+
"⏳ Calculating the reservation from your current settings…",
|
| 7668 |
elem_classes="gpu-estimate",
|
| 7669 |
)
|
| 7670 |
gpu_estimate_btn = gr.Button("🔄", variant="secondary", scale=1, min_width=60,
|
|
|
|
| 8571 |
*ui_inputs[16:53],
|
| 8572 |
guidance_scale_2_input, scheduler_dropdown, flow_shift_slider, last_image_component,
|
| 8573 |
]
|
| 8574 |
+
# Read the real component values on every page open. A hardcoded estimate here
|
| 8575 |
+
# used Safe Mode=True although the actual checkbox defaults to False, and used
|
| 8576 |
+
# a different flow shift, so it could show a larger/unrelated timing history.
|
| 8577 |
+
demo.load(_gpu_estimate_text, _ESTIMATE_INPUTS, gpu_estimate,
|
| 8578 |
+
show_progress="hidden", api_name=False)
|
| 8579 |
+
# Further recalculation is on demand and after preparation/Safe Mode changes;
|
| 8580 |
+
# no background polling or event for every slider movement.
|
| 8581 |
pb_button.click(
|
| 8582 |
fn=enhance_prompt,
|
| 8583 |
inputs=[prompt_input, pb_use_model, pb_camera, pb_framing, pb_lighting, pb_pace, pb_quality],
|