Spaces:
Running on Zero
Running on Zero
Commit ·
00c5735
1
Parent(s): 985bfa2
Fix UI layout: move hidden regen groups outside gr.Row
Browse filesgr.Group(visible=False) was inside gr.Row, acting as a third column
and breaking the two-column layout. Moved outside the Row block,
at Tab level, so they have zero layout impact.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -1763,15 +1763,15 @@ with gr.Blocks(title="Generate Audio for Video", css=_SLOT_CSS, js=_GLOBAL_JS) a
|
|
| 1763 |
taro_samples = gr.Slider(label="Generations", minimum=1, maximum=MAX_SLOTS, value=1, step=1)
|
| 1764 |
taro_btn = gr.Button("Generate", variant="primary")
|
| 1765 |
|
| 1766 |
-
with gr.Group(visible=False):
|
| 1767 |
-
# Hidden regen plumbing — zero DOM footprint, do NOT remove
|
| 1768 |
-
taro_regen_seg = gr.Textbox(value="0", elem_id="taro_regen_seg")
|
| 1769 |
-
taro_regen_state = gr.Textbox(value="", elem_id="taro_regen_state")
|
| 1770 |
-
|
| 1771 |
with gr.Column():
|
| 1772 |
(taro_slot_grps, taro_slot_vids,
|
| 1773 |
taro_slot_waves) = _make_output_slots("taro")
|
| 1774 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1775 |
for trigger in [taro_video, taro_steps, taro_cf_dur]:
|
| 1776 |
trigger.change(
|
| 1777 |
fn=_on_video_upload_taro,
|
|
@@ -1871,15 +1871,15 @@ with gr.Blocks(title="Generate Audio for Video", css=_SLOT_CSS, js=_GLOBAL_JS) a
|
|
| 1871 |
mma_samples = gr.Slider(label="Generations", minimum=1, maximum=MAX_SLOTS, value=1, step=1)
|
| 1872 |
mma_btn = gr.Button("Generate", variant="primary")
|
| 1873 |
|
| 1874 |
-
with gr.Group(visible=False):
|
| 1875 |
-
# Hidden regen plumbing — zero DOM footprint, do NOT remove
|
| 1876 |
-
mma_regen_seg = gr.Textbox(value="0", elem_id="mma_regen_seg")
|
| 1877 |
-
mma_regen_state = gr.Textbox(value="", elem_id="mma_regen_state")
|
| 1878 |
-
|
| 1879 |
with gr.Column():
|
| 1880 |
(mma_slot_grps, mma_slot_vids,
|
| 1881 |
mma_slot_waves) = _make_output_slots("mma")
|
| 1882 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1883 |
mma_samples.change(
|
| 1884 |
fn=_update_slot_visibility,
|
| 1885 |
inputs=[mma_samples],
|
|
@@ -1963,15 +1963,15 @@ with gr.Blocks(title="Generate Audio for Video", css=_SLOT_CSS, js=_GLOBAL_JS) a
|
|
| 1963 |
hf_samples = gr.Slider(label="Generations", minimum=1, maximum=MAX_SLOTS, value=1, step=1)
|
| 1964 |
hf_btn = gr.Button("Generate", variant="primary")
|
| 1965 |
|
| 1966 |
-
with gr.Group(visible=False):
|
| 1967 |
-
# Hidden regen plumbing — zero DOM footprint, do NOT remove
|
| 1968 |
-
hf_regen_seg = gr.Textbox(value="0", elem_id="hf_regen_seg")
|
| 1969 |
-
hf_regen_state = gr.Textbox(value="", elem_id="hf_regen_state")
|
| 1970 |
-
|
| 1971 |
with gr.Column():
|
| 1972 |
(hf_slot_grps, hf_slot_vids,
|
| 1973 |
hf_slot_waves) = _make_output_slots("hf")
|
| 1974 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1975 |
hf_samples.change(
|
| 1976 |
fn=_update_slot_visibility,
|
| 1977 |
inputs=[hf_samples],
|
|
|
|
| 1763 |
taro_samples = gr.Slider(label="Generations", minimum=1, maximum=MAX_SLOTS, value=1, step=1)
|
| 1764 |
taro_btn = gr.Button("Generate", variant="primary")
|
| 1765 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1766 |
with gr.Column():
|
| 1767 |
(taro_slot_grps, taro_slot_vids,
|
| 1768 |
taro_slot_waves) = _make_output_slots("taro")
|
| 1769 |
|
| 1770 |
+
# Hidden regen plumbing — outside Row so no layout impact
|
| 1771 |
+
with gr.Group(visible=False):
|
| 1772 |
+
taro_regen_seg = gr.Textbox(value="0", elem_id="taro_regen_seg")
|
| 1773 |
+
taro_regen_state = gr.Textbox(value="", elem_id="taro_regen_state")
|
| 1774 |
+
|
| 1775 |
for trigger in [taro_video, taro_steps, taro_cf_dur]:
|
| 1776 |
trigger.change(
|
| 1777 |
fn=_on_video_upload_taro,
|
|
|
|
| 1871 |
mma_samples = gr.Slider(label="Generations", minimum=1, maximum=MAX_SLOTS, value=1, step=1)
|
| 1872 |
mma_btn = gr.Button("Generate", variant="primary")
|
| 1873 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1874 |
with gr.Column():
|
| 1875 |
(mma_slot_grps, mma_slot_vids,
|
| 1876 |
mma_slot_waves) = _make_output_slots("mma")
|
| 1877 |
|
| 1878 |
+
# Hidden regen plumbing — outside Row so no layout impact
|
| 1879 |
+
with gr.Group(visible=False):
|
| 1880 |
+
mma_regen_seg = gr.Textbox(value="0", elem_id="mma_regen_seg")
|
| 1881 |
+
mma_regen_state = gr.Textbox(value="", elem_id="mma_regen_state")
|
| 1882 |
+
|
| 1883 |
mma_samples.change(
|
| 1884 |
fn=_update_slot_visibility,
|
| 1885 |
inputs=[mma_samples],
|
|
|
|
| 1963 |
hf_samples = gr.Slider(label="Generations", minimum=1, maximum=MAX_SLOTS, value=1, step=1)
|
| 1964 |
hf_btn = gr.Button("Generate", variant="primary")
|
| 1965 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1966 |
with gr.Column():
|
| 1967 |
(hf_slot_grps, hf_slot_vids,
|
| 1968 |
hf_slot_waves) = _make_output_slots("hf")
|
| 1969 |
|
| 1970 |
+
# Hidden regen plumbing — outside Row so no layout impact
|
| 1971 |
+
with gr.Group(visible=False):
|
| 1972 |
+
hf_regen_seg = gr.Textbox(value="0", elem_id="hf_regen_seg")
|
| 1973 |
+
hf_regen_state = gr.Textbox(value="", elem_id="hf_regen_state")
|
| 1974 |
+
|
| 1975 |
hf_samples.change(
|
| 1976 |
fn=_update_slot_visibility,
|
| 1977 |
inputs=[hf_samples],
|