Commit ·
bd7399c
1
Parent(s): 00c5735
Fix UI layout: replace gr.Group(visible=False) with gr.State for regen plumbing
Browse files
app.py
CHANGED
|
@@ -1767,10 +1767,9 @@ with gr.Blocks(title="Generate Audio for Video", css=_SLOT_CSS, js=_GLOBAL_JS) a
|
|
| 1767 |
(taro_slot_grps, taro_slot_vids,
|
| 1768 |
taro_slot_waves) = _make_output_slots("taro")
|
| 1769 |
|
| 1770 |
-
# Hidden regen plumbing —
|
| 1771 |
-
|
| 1772 |
-
|
| 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(
|
|
@@ -1875,10 +1874,9 @@ with gr.Blocks(title="Generate Audio for Video", css=_SLOT_CSS, js=_GLOBAL_JS) a
|
|
| 1875 |
(mma_slot_grps, mma_slot_vids,
|
| 1876 |
mma_slot_waves) = _make_output_slots("mma")
|
| 1877 |
|
| 1878 |
-
# Hidden regen plumbing —
|
| 1879 |
-
|
| 1880 |
-
|
| 1881 |
-
mma_regen_state = gr.Textbox(value="", elem_id="mma_regen_state")
|
| 1882 |
|
| 1883 |
mma_samples.change(
|
| 1884 |
fn=_update_slot_visibility,
|
|
@@ -1967,10 +1965,9 @@ with gr.Blocks(title="Generate Audio for Video", css=_SLOT_CSS, js=_GLOBAL_JS) a
|
|
| 1967 |
(hf_slot_grps, hf_slot_vids,
|
| 1968 |
hf_slot_waves) = _make_output_slots("hf")
|
| 1969 |
|
| 1970 |
-
# Hidden regen plumbing —
|
| 1971 |
-
|
| 1972 |
-
|
| 1973 |
-
hf_regen_state = gr.Textbox(value="", elem_id="hf_regen_state")
|
| 1974 |
|
| 1975 |
hf_samples.change(
|
| 1976 |
fn=_update_slot_visibility,
|
|
|
|
| 1767 |
(taro_slot_grps, taro_slot_vids,
|
| 1768 |
taro_slot_waves) = _make_output_slots("taro")
|
| 1769 |
|
| 1770 |
+
# Hidden regen plumbing — gr.State has zero DOM footprint
|
| 1771 |
+
taro_regen_seg = gr.State(value="0")
|
| 1772 |
+
taro_regen_state = gr.State(value="")
|
|
|
|
| 1773 |
|
| 1774 |
for trigger in [taro_video, taro_steps, taro_cf_dur]:
|
| 1775 |
trigger.change(
|
|
|
|
| 1874 |
(mma_slot_grps, mma_slot_vids,
|
| 1875 |
mma_slot_waves) = _make_output_slots("mma")
|
| 1876 |
|
| 1877 |
+
# Hidden regen plumbing — gr.State has zero DOM footprint
|
| 1878 |
+
mma_regen_seg = gr.State(value="0")
|
| 1879 |
+
mma_regen_state = gr.State(value="")
|
|
|
|
| 1880 |
|
| 1881 |
mma_samples.change(
|
| 1882 |
fn=_update_slot_visibility,
|
|
|
|
| 1965 |
(hf_slot_grps, hf_slot_vids,
|
| 1966 |
hf_slot_waves) = _make_output_slots("hf")
|
| 1967 |
|
| 1968 |
+
# Hidden regen plumbing — gr.State has zero DOM footprint
|
| 1969 |
+
hf_regen_seg = gr.State(value="0")
|
| 1970 |
+
hf_regen_state = gr.State(value="")
|
|
|
|
| 1971 |
|
| 1972 |
hf_samples.change(
|
| 1973 |
fn=_update_slot_visibility,
|