Spaces:
Running on Zero
Running on Zero
vimalprasad37 Claude Opus 5 (1M context) commited on
Commit Β·
b00dfd9
1
Parent(s): ace6e71
Full-width cost readout, Tips to the top, roomier layout
Browse filesThe estimate shared a row with its refresh button, so on a phone the text
was squeezed into a narrow column and wrapped to a dozen lines. The button
joins Stop/Clear and the readout gets the full width.
Tips moves above the upload warning at the top of the left column.
Widen the cap to 1760px, and on mobile trim the nested paddings that were
each taking a slice out of a ~390px screen.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
app.py
CHANGED
|
@@ -2710,7 +2710,7 @@ CSS = """
|
|
| 2710 |
missing `margin: auto` was, which left the page hard against the left edge of
|
| 2711 |
a wide monitor. Capped and centred, it fills a laptop screen and stays a
|
| 2712 |
comfortable reading width on a large one rather than stretching edge to edge. */
|
| 2713 |
-
max-width:
|
| 2714 |
width: 100% !important;
|
| 2715 |
/* Without this the side padding is ADDED to the 100% width, making the box
|
| 2716 |
wider than the screen; `margin:auto` then centres that oversized box and
|
|
@@ -2854,6 +2854,8 @@ gradio-app, .gradio-container { overflow-x: clip; }
|
|
| 2854 |
backdrop-filter: blur(10px);
|
| 2855 |
}
|
| 2856 |
#run-dock > * { flex: 0 0 auto !important; }
|
|
|
|
|
|
|
| 2857 |
#estimate-btn, #enhance-btn { min-height: 42px !important; border-radius: 12px !important; }
|
| 2858 |
#search-btn, #search-put, #extend-btn, #lora-identify, #profile-load, #profile-save, #profile-delete, #profile-refresh {
|
| 2859 |
min-height: 42px !important; border-radius: 12px !important; font-weight: 600 !important;
|
|
@@ -2898,7 +2900,9 @@ gradio-app, .gradio-container { overflow-x: clip; }
|
|
| 2898 |
|
| 2899 |
.gpu-estimate {
|
| 2900 |
border-radius: 12px;
|
| 2901 |
-
padding:
|
|
|
|
|
|
|
| 2902 |
background: rgba(139, 92, 246, .10);
|
| 2903 |
border: 1px solid rgba(139, 92, 246, .35);
|
| 2904 |
font-size: var(--fs-base);
|
|
@@ -2984,13 +2988,24 @@ label > span, .gradio-container .info, .gradio-container small { opacity: .95 !i
|
|
| 2984 |
/* A step down on a phone: the same scale at full size would push the panels
|
| 2985 |
far taller than the screen. */
|
| 2986 |
:root { --fs-base: 14.5px; --fs-lg: 15.5px; }
|
|
|
|
|
|
|
|
|
|
| 2987 |
.gradio-container {
|
| 2988 |
-
padding-left:
|
| 2989 |
-
padding-right:
|
| 2990 |
padding-top: 12px !important;
|
| 2991 |
padding-bottom: 20px !important;
|
| 2992 |
}
|
| 2993 |
-
.panel { padding:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2994 |
|
| 2995 |
/* A long unbroken string - a CivitAI download URL in a lora box, a status
|
| 2996 |
line - is wider than the screen on its own and drags the page sideways
|
|
@@ -3154,6 +3169,53 @@ with gr.Blocks(delete_cache=(3600, 86400)) as demo:
|
|
| 3154 |
# ---------------- LEFT: controls ----------------
|
| 3155 |
with gr.Column(scale=5):
|
| 3156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3157 |
with gr.Group(elem_classes="panel"):
|
| 3158 |
gr.Markdown(
|
| 3159 |
"Upload only photographs of yourself, or of people who have agreed to this. "
|
|
@@ -3497,13 +3559,16 @@ with gr.Blocks(delete_cache=(3600, 86400)) as demo:
|
|
| 3497 |
with gr.Row():
|
| 3498 |
stop_button = gr.Button("βΉ Stop", variant="stop", elem_id="stop-btn")
|
| 3499 |
clear_button = gr.Button("π§Ή Clear", variant="secondary", elem_id="clear-btn")
|
| 3500 |
-
|
| 3501 |
-
|
| 3502 |
-
|
| 3503 |
-
|
| 3504 |
-
|
| 3505 |
-
gpu_estimate_btn = gr.Button("π", variant="secondary", scale=1, min_width=60,
|
| 3506 |
elem_id="estimate-btn")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3507 |
with gr.Group(elem_classes="panel"):
|
| 3508 |
video_output = gr.Video(
|
| 3509 |
label="Generated Video",
|
|
@@ -3644,53 +3709,6 @@ with gr.Blocks(delete_cache=(3600, 86400)) as demo:
|
|
| 3644 |
merged_file = gr.File(label="β¬οΈ Download the stitched video")
|
| 3645 |
merge_queue = gr.State([])
|
| 3646 |
|
| 3647 |
-
with gr.Accordion("π‘ Tips", open=False):
|
| 3648 |
-
gr.Markdown(
|
| 3649 |
-
"**Workflow**\n"
|
| 3650 |
-
"- Pause the video on any frame, then hit **Use current frame** to continue the shot from there.\n"
|
| 3651 |
-
"- Keep **Randomize seed** on while exploring, then lock a seed you like.\n"
|
| 3652 |
-
"- **Loop the clip** and **Stitch clips** both run on the CPU and cost nothing "
|
| 3653 |
-
"from your ZeroGPU allowance β use them freely.\n\n"
|
| 3654 |
-
"**Steps & speed**\n"
|
| 3655 |
-
"- 6 steps + UniPC is the sweet spot; more steps rarely helps this model.\n"
|
| 3656 |
-
"- A **Speed preset** sets steps, flow shift and scheduler together. Pick one "
|
| 3657 |
-
"first, then adjust individual sliders only if something looks off.\n"
|
| 3658 |
-
"- **Guidance** above 1 turns on classifier-free guidance: it uses roughly "
|
| 3659 |
-
"twice the GPU per step and takes proportionally longer. Leave both at 1 "
|
| 3660 |
-
"unless the prompt is being ignored.\n"
|
| 3661 |
-
"- The **Negative prompt** is only read when a Guidance slider is above 1. "
|
| 3662 |
-
"At guidance 1 it does nothing.\n\n"
|
| 3663 |
-
"**Duration & fluidity**\n"
|
| 3664 |
-
"- Duration is clamped to the model's frame range, so the slider may not land "
|
| 3665 |
-
"exactly where you put it. 3β3.5 s is the comfortable range.\n"
|
| 3666 |
-
"- **Fluidity** interpolates extra frames after generation β it adds smoothness, "
|
| 3667 |
-
"not new content. Motion that stutters at the base rate will still stutter, "
|
| 3668 |
-
"just more smoothly. It also makes the file bigger.\n"
|
| 3669 |
-
"- For anything longer than one clip, generate short clips and stitch them "
|
| 3670 |
-
"rather than pushing duration up.\n\n"
|
| 3671 |
-
"**Stitching**\n"
|
| 3672 |
-
"- Clips are concatenated end to end, everything scaled to the first clip's "
|
| 3673 |
-
"frame. There is no crossfade, so keep the same aspect and fluidity across a "
|
| 3674 |
-
"chain or the joins will be visible.\n"
|
| 3675 |
-
"- **π¬ Make the whole scene** and **β Just one more clip** always add their "
|
| 3676 |
-
"clips to the joined video, whatever the automatic box says β the very first "
|
| 3677 |
-
"clip included.\n"
|
| 3678 |
-
"- Leave **π Keep the same face** empty unless you need it: with it empty each "
|
| 3679 |
-
"clip starts on the exact last frame of the one before, the duplicated frame is "
|
| 3680 |
-
"detected and trimmed, and the join is invisible.\n\n"
|
| 3681 |
-
"**Images & aspect**\n"
|
| 3682 |
-
"- The checkpoint accepts 480β832 px per side, so anything past about 1.73:1 "
|
| 3683 |
-
"has to give: **Crop to fit** cuts the middle out, **Keep it all** adds black "
|
| 3684 |
-
"bars. Crop looks better unless something important sits near an edge.\n"
|
| 3685 |
-
"- Cropping happens after upload, so pre-cropping your image to roughly the "
|
| 3686 |
-
"render aspect is the only way to control exactly what survives.\n\n"
|
| 3687 |
-
"**Loras**\n"
|
| 3688 |
-
"- Custom loras download on first use, which happens inside GPU time β run one "
|
| 3689 |
-
"throwaway generation after adding a new lora so the next takes are clean.\n"
|
| 3690 |
-
"- **High** and **Low** strength apply to the two noise stages. If a lora is "
|
| 3691 |
-
"overpowering the composition, drop High first and leave Low alone."
|
| 3692 |
-
)
|
| 3693 |
-
|
| 3694 |
ui_inputs = [
|
| 3695 |
input_image_component, last_image_component, prompt_input, steps_slider,
|
| 3696 |
negative_prompt_input, duration_seconds_input,
|
|
|
|
| 2710 |
missing `margin: auto` was, which left the page hard against the left edge of
|
| 2711 |
a wide monitor. Capped and centred, it fills a laptop screen and stays a
|
| 2712 |
comfortable reading width on a large one rather than stretching edge to edge. */
|
| 2713 |
+
max-width: 1760px !important;
|
| 2714 |
width: 100% !important;
|
| 2715 |
/* Without this the side padding is ADDED to the 100% width, making the box
|
| 2716 |
wider than the screen; `margin:auto` then centres that oversized box and
|
|
|
|
| 2854 |
backdrop-filter: blur(10px);
|
| 2855 |
}
|
| 2856 |
#run-dock > * { flex: 0 0 auto !important; }
|
| 2857 |
+
#run-dock .gpu-estimate { width: 100% !important; }
|
| 2858 |
+
#estimate-btn { flex: 1 1 auto !important; }
|
| 2859 |
#estimate-btn, #enhance-btn { min-height: 42px !important; border-radius: 12px !important; }
|
| 2860 |
#search-btn, #search-put, #extend-btn, #lora-identify, #profile-load, #profile-save, #profile-delete, #profile-refresh {
|
| 2861 |
min-height: 42px !important; border-radius: 12px !important; font-weight: 600 !important;
|
|
|
|
| 2900 |
|
| 2901 |
.gpu-estimate {
|
| 2902 |
border-radius: 12px;
|
| 2903 |
+
padding: 12px 16px;
|
| 2904 |
+
width: 100%;
|
| 2905 |
+
box-sizing: border-box;
|
| 2906 |
background: rgba(139, 92, 246, .10);
|
| 2907 |
border: 1px solid rgba(139, 92, 246, .35);
|
| 2908 |
font-size: var(--fs-base);
|
|
|
|
| 2988 |
/* A step down on a phone: the same scale at full size would push the panels
|
| 2989 |
far taller than the screen. */
|
| 2990 |
:root { --fs-base: 14.5px; --fs-lg: 15.5px; }
|
| 2991 |
+
/* Every nested box was taking its own side padding out of a ~390px screen,
|
| 2992 |
+
so by the third level the text column was barely half the width. Trim the
|
| 2993 |
+
outer gutters and the panel inset to give the content back. */
|
| 2994 |
.gradio-container {
|
| 2995 |
+
padding-left: 8px !important;
|
| 2996 |
+
padding-right: 8px !important;
|
| 2997 |
padding-top: 12px !important;
|
| 2998 |
padding-bottom: 20px !important;
|
| 2999 |
}
|
| 3000 |
+
.panel { padding: 12px !important; }
|
| 3001 |
+
#access-panel { padding: 12px !important; }
|
| 3002 |
+
.gradio-container .block,
|
| 3003 |
+
.gradio-container .form { padding-left: 0 !important; padding-right: 0 !important; }
|
| 3004 |
+
.gradio-container .gap { gap: 8px !important; }
|
| 3005 |
+
|
| 3006 |
+
/* Stack the two columns full width rather than letting them share a row. */
|
| 3007 |
+
.gradio-container .grid-wrap, .gradio-container > .main .wrap { min-width: 0 !important; }
|
| 3008 |
+
#run-dock { padding: 8px !important; }
|
| 3009 |
|
| 3010 |
/* A long unbroken string - a CivitAI download URL in a lora box, a status
|
| 3011 |
line - is wider than the screen on its own and drags the page sideways
|
|
|
|
| 3169 |
# ---------------- LEFT: controls ----------------
|
| 3170 |
with gr.Column(scale=5):
|
| 3171 |
|
| 3172 |
+
with gr.Accordion("π‘ Tips", open=False):
|
| 3173 |
+
gr.Markdown(
|
| 3174 |
+
"**Workflow**\n"
|
| 3175 |
+
"- Pause the video on any frame, then hit **Use current frame** to continue the shot from there.\n"
|
| 3176 |
+
"- Keep **Randomize seed** on while exploring, then lock a seed you like.\n"
|
| 3177 |
+
"- **Loop the clip** and **Stitch clips** both run on the CPU and cost nothing "
|
| 3178 |
+
"from your ZeroGPU allowance β use them freely.\n\n"
|
| 3179 |
+
"**Steps & speed**\n"
|
| 3180 |
+
"- 6 steps + UniPC is the sweet spot; more steps rarely helps this model.\n"
|
| 3181 |
+
"- A **Speed preset** sets steps, flow shift and scheduler together. Pick one "
|
| 3182 |
+
"first, then adjust individual sliders only if something looks off.\n"
|
| 3183 |
+
"- **Guidance** above 1 turns on classifier-free guidance: it uses roughly "
|
| 3184 |
+
"twice the GPU per step and takes proportionally longer. Leave both at 1 "
|
| 3185 |
+
"unless the prompt is being ignored.\n"
|
| 3186 |
+
"- The **Negative prompt** is only read when a Guidance slider is above 1. "
|
| 3187 |
+
"At guidance 1 it does nothing.\n\n"
|
| 3188 |
+
"**Duration & fluidity**\n"
|
| 3189 |
+
"- Duration is clamped to the model's frame range, so the slider may not land "
|
| 3190 |
+
"exactly where you put it. 3β3.5 s is the comfortable range.\n"
|
| 3191 |
+
"- **Fluidity** interpolates extra frames after generation β it adds smoothness, "
|
| 3192 |
+
"not new content. Motion that stutters at the base rate will still stutter, "
|
| 3193 |
+
"just more smoothly. It also makes the file bigger.\n"
|
| 3194 |
+
"- For anything longer than one clip, generate short clips and stitch them "
|
| 3195 |
+
"rather than pushing duration up.\n\n"
|
| 3196 |
+
"**Stitching**\n"
|
| 3197 |
+
"- Clips are concatenated end to end, everything scaled to the first clip's "
|
| 3198 |
+
"frame. There is no crossfade, so keep the same aspect and fluidity across a "
|
| 3199 |
+
"chain or the joins will be visible.\n"
|
| 3200 |
+
"- **π¬ Make the whole scene** and **β Just one more clip** always add their "
|
| 3201 |
+
"clips to the joined video, whatever the automatic box says β the very first "
|
| 3202 |
+
"clip included.\n"
|
| 3203 |
+
"- Leave **π Keep the same face** empty unless you need it: with it empty each "
|
| 3204 |
+
"clip starts on the exact last frame of the one before, the duplicated frame is "
|
| 3205 |
+
"detected and trimmed, and the join is invisible.\n\n"
|
| 3206 |
+
"**Images & aspect**\n"
|
| 3207 |
+
"- The checkpoint accepts 480β832 px per side, so anything past about 1.73:1 "
|
| 3208 |
+
"has to give: **Crop to fit** cuts the middle out, **Keep it all** adds black "
|
| 3209 |
+
"bars. Crop looks better unless something important sits near an edge.\n"
|
| 3210 |
+
"- Cropping happens after upload, so pre-cropping your image to roughly the "
|
| 3211 |
+
"render aspect is the only way to control exactly what survives.\n\n"
|
| 3212 |
+
"**Loras**\n"
|
| 3213 |
+
"- Custom loras download on first use, which happens inside GPU time β run one "
|
| 3214 |
+
"throwaway generation after adding a new lora so the next takes are clean.\n"
|
| 3215 |
+
"- **High** and **Low** strength apply to the two noise stages. If a lora is "
|
| 3216 |
+
"overpowering the composition, drop High first and leave Low alone."
|
| 3217 |
+
)
|
| 3218 |
+
|
| 3219 |
with gr.Group(elem_classes="panel"):
|
| 3220 |
gr.Markdown(
|
| 3221 |
"Upload only photographs of yourself, or of people who have agreed to this. "
|
|
|
|
| 3559 |
with gr.Row():
|
| 3560 |
stop_button = gr.Button("βΉ Stop", variant="stop", elem_id="stop-btn")
|
| 3561 |
clear_button = gr.Button("π§Ή Clear", variant="secondary", elem_id="clear-btn")
|
| 3562 |
+
# The refresh sits up here with the other controls so the cost
|
| 3563 |
+
# readout below can have the full width to itself. Beside it the
|
| 3564 |
+
# text was squeezed into a narrow column and wrapped to a dozen
|
| 3565 |
+
# lines on a phone.
|
| 3566 |
+
gpu_estimate_btn = gr.Button("π Recalculate", variant="secondary",
|
|
|
|
| 3567 |
elem_id="estimate-btn")
|
| 3568 |
+
gpu_estimate = gr.Markdown(
|
| 3569 |
+
_gpu_estimate_text(None, 3.5, 6, 1, FIXED_FPS, True, 3, False),
|
| 3570 |
+
elem_classes="gpu-estimate",
|
| 3571 |
+
)
|
| 3572 |
with gr.Group(elem_classes="panel"):
|
| 3573 |
video_output = gr.Video(
|
| 3574 |
label="Generated Video",
|
|
|
|
| 3709 |
merged_file = gr.File(label="β¬οΈ Download the stitched video")
|
| 3710 |
merge_queue = gr.State([])
|
| 3711 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3712 |
ui_inputs = [
|
| 3713 |
input_image_component, last_image_component, prompt_input, steps_slider,
|
| 3714 |
negative_prompt_input, duration_seconds_input,
|