Spaces:
Running
on
A10G
Running
on
A10G
Linoy Tsaban
commited on
Commit
•
1911032
1
Parent(s):
a1e82c6
Update app.py
Browse filesclear logic changes
app.py
CHANGED
@@ -599,7 +599,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
599 |
with gr.TabItem('General options', id=2):
|
600 |
with gr.Row():
|
601 |
with gr.Column(min_width=100):
|
602 |
-
clear_button = gr.Button("Clear", visible=
|
603 |
src_prompt = gr.Textbox(lines=1, label="Source Prompt", interactive=True, placeholder="")
|
604 |
steps = gr.Number(value=100, precision=0, label="Num Diffusion Steps", interactive=True)
|
605 |
src_cfg_scale = gr.Number(value=3.5, label=f"Source Guidance Scale", interactive=True)
|
@@ -777,14 +777,16 @@ with gr.Blocks(css="style.css") as demo:
|
|
777 |
tar_prompt, skip, tar_cfg_scale, reconstruct_button,reconstruct_button,
|
778 |
edit_concept_1, guidnace_scale_1,guidnace_scale_1,warmup_1, threshold_1, neg_guidance_1,dropdown1, concept_1, concept_1,
|
779 |
edit_concept_2, guidnace_scale_2,guidnace_scale_2,warmup_2, threshold_2, neg_guidance_2,dropdown2, concept_2, concept_2, row2, row2_advanced,
|
780 |
-
edit_concept_3, guidnace_scale_3,guidnace_scale_3,warmup_3, threshold_3, neg_guidance_3,dropdown3, concept_3,concept_3, row3, row3_advanced
|
|
|
781 |
|
782 |
clear_components_output_vals = [None, None,ddpm_edited_image.update(visible=False), None, True,
|
783 |
"", DEFAULT_DIFFUSION_STEPS, DEFAULT_SOURCE_GUIDANCE_SCALE, DEFAULT_SEED,
|
784 |
-
"", DEFAULT_SKIP_STEPS, DEFAULT_TARGET_GUIDANCE_SCALE, reconstruct_button.update(value="Show Reconstruction"),reconstruct_button.update(visible=False)
|
785 |
"", DEFAULT_SEGA_CONCEPT_GUIDANCE_SCALE,guidnace_scale_1.update(visible=False), DEFAULT_WARMUP_STEPS, DEFAULT_THRESHOLD, DEFAULT_NEGATIVE_GUIDANCE, "","default", concept_1.update(visible=False),
|
786 |
"", DEFAULT_SEGA_CONCEPT_GUIDANCE_SCALE,guidnace_scale_2.update(visible=False), DEFAULT_WARMUP_STEPS, DEFAULT_THRESHOLD, DEFAULT_NEGATIVE_GUIDANCE, "","default", concept_2.update(visible=False), row2.update(visible=False), row2_advanced.update(visible=False),
|
787 |
-
"", DEFAULT_SEGA_CONCEPT_GUIDANCE_SCALE,guidnace_scale_3.update(visible=False), DEFAULT_WARMUP_STEPS, DEFAULT_THRESHOLD, DEFAULT_NEGATIVE_GUIDANCE, "","default",concept_3.update(visible=False), row3.update(visible=False), row3_advanced.update(visible=False)
|
|
|
788 |
]
|
789 |
|
790 |
|
|
|
599 |
with gr.TabItem('General options', id=2):
|
600 |
with gr.Row():
|
601 |
with gr.Column(min_width=100):
|
602 |
+
clear_button = gr.Button("Clear", visible=True)
|
603 |
src_prompt = gr.Textbox(lines=1, label="Source Prompt", interactive=True, placeholder="")
|
604 |
steps = gr.Number(value=100, precision=0, label="Num Diffusion Steps", interactive=True)
|
605 |
src_cfg_scale = gr.Number(value=3.5, label=f"Source Guidance Scale", interactive=True)
|
|
|
777 |
tar_prompt, skip, tar_cfg_scale, reconstruct_button,reconstruct_button,
|
778 |
edit_concept_1, guidnace_scale_1,guidnace_scale_1,warmup_1, threshold_1, neg_guidance_1,dropdown1, concept_1, concept_1,
|
779 |
edit_concept_2, guidnace_scale_2,guidnace_scale_2,warmup_2, threshold_2, neg_guidance_2,dropdown2, concept_2, concept_2, row2, row2_advanced,
|
780 |
+
edit_concept_3, guidnace_scale_3,guidnace_scale_3,warmup_3, threshold_3, neg_guidance_3,dropdown3, concept_3,concept_3, row3, row3_advanced,
|
781 |
+
row4,sega_concepts_counter, box1, box2, box3 ]
|
782 |
|
783 |
clear_components_output_vals = [None, None,ddpm_edited_image.update(visible=False), None, True,
|
784 |
"", DEFAULT_DIFFUSION_STEPS, DEFAULT_SOURCE_GUIDANCE_SCALE, DEFAULT_SEED,
|
785 |
+
"", DEFAULT_SKIP_STEPS, DEFAULT_TARGET_GUIDANCE_SCALE, reconstruct_button.update(value="Show Reconstruction"),reconstruct_button.update(visible=False)
|
786 |
"", DEFAULT_SEGA_CONCEPT_GUIDANCE_SCALE,guidnace_scale_1.update(visible=False), DEFAULT_WARMUP_STEPS, DEFAULT_THRESHOLD, DEFAULT_NEGATIVE_GUIDANCE, "","default", concept_1.update(visible=False),
|
787 |
"", DEFAULT_SEGA_CONCEPT_GUIDANCE_SCALE,guidnace_scale_2.update(visible=False), DEFAULT_WARMUP_STEPS, DEFAULT_THRESHOLD, DEFAULT_NEGATIVE_GUIDANCE, "","default", concept_2.update(visible=False), row2.update(visible=False), row2_advanced.update(visible=False),
|
788 |
+
"", DEFAULT_SEGA_CONCEPT_GUIDANCE_SCALE,guidnace_scale_3.update(visible=False), DEFAULT_WARMUP_STEPS, DEFAULT_THRESHOLD, DEFAULT_NEGATIVE_GUIDANCE, "","default",concept_3.update(visible=False), row3.update(visible=False), row3_advanced.update(visible=False, row.update(visible=False), gr.State(0)),
|
789 |
+
box1.update(visible=False), box2.update(visible=False), box3.update(visible=False)
|
790 |
]
|
791 |
|
792 |
|