Spaces:
Running
on
Zero
Running
on
Zero
fix sd
Browse files- app.py +12 -10
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -455,6 +455,8 @@ def run_fn(
|
|
| 455 |
num_images = len(images)
|
| 456 |
if num_images > 100:
|
| 457 |
return super_duper_long_run(model, images, **kwargs)
|
|
|
|
|
|
|
| 458 |
if recursion:
|
| 459 |
return longer_run(model, images, **kwargs)
|
| 460 |
if num_images > 50:
|
|
@@ -755,6 +757,16 @@ with demo:
|
|
| 755 |
|
| 756 |
gr.Markdown('---')
|
| 757 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 758 |
with gr.Row():
|
| 759 |
with gr.Column(scale=5, min_width=200):
|
| 760 |
input_gallery, submit_button, clear_images_button = make_input_images_section()
|
|
@@ -781,16 +793,6 @@ with demo:
|
|
| 781 |
num_eig_slider.visible = False
|
| 782 |
affinity_focal_gamma_slider.visible = False
|
| 783 |
# logging text box
|
| 784 |
-
with gr.Row():
|
| 785 |
-
with gr.Column(scale=5, min_width=200):
|
| 786 |
-
gr.Markdown('### Output (Recursion #1)')
|
| 787 |
-
l1_gallery = gr.Gallery(value=[], label="Recursion #1", show_label=False, elem_id="ncut_l1", columns=[3], rows=[5], object_fit="contain", height="auto")
|
| 788 |
-
with gr.Column(scale=5, min_width=200):
|
| 789 |
-
gr.Markdown('### Output (Recursion #2)')
|
| 790 |
-
l2_gallery = gr.Gallery(value=[], label="Recursion #2", show_label=False, elem_id="ncut_l2", columns=[3], rows=[5], object_fit="contain", height="auto")
|
| 791 |
-
with gr.Column(scale=5, min_width=200):
|
| 792 |
-
gr.Markdown('### Output (Recursion #3)')
|
| 793 |
-
l3_gallery = gr.Gallery(value=[], label="Recursion #3", show_label=False, elem_id="ncut_l3", columns=[3], rows=[5], object_fit="contain", height="auto")
|
| 794 |
with gr.Row():
|
| 795 |
with gr.Column(scale=5, min_width=200):
|
| 796 |
gr.Markdown(' ')
|
|
|
|
| 455 |
num_images = len(images)
|
| 456 |
if num_images > 100:
|
| 457 |
return super_duper_long_run(model, images, **kwargs)
|
| 458 |
+
if 'diffusion' in model_name.lower():
|
| 459 |
+
return super_duper_long_run(model, images, **kwargs)
|
| 460 |
if recursion:
|
| 461 |
return longer_run(model, images, **kwargs)
|
| 462 |
if num_images > 50:
|
|
|
|
| 757 |
|
| 758 |
gr.Markdown('---')
|
| 759 |
|
| 760 |
+
with gr.Row():
|
| 761 |
+
with gr.Column(scale=5, min_width=200):
|
| 762 |
+
gr.Markdown('### Output (Recursion #1)')
|
| 763 |
+
l1_gallery = gr.Gallery(value=[], label="Recursion #1", show_label=False, elem_id="ncut_l1", columns=[3], rows=[5], object_fit="contain", height="auto")
|
| 764 |
+
with gr.Column(scale=5, min_width=200):
|
| 765 |
+
gr.Markdown('### Output (Recursion #2)')
|
| 766 |
+
l2_gallery = gr.Gallery(value=[], label="Recursion #2", show_label=False, elem_id="ncut_l2", columns=[3], rows=[5], object_fit="contain", height="auto")
|
| 767 |
+
with gr.Column(scale=5, min_width=200):
|
| 768 |
+
gr.Markdown('### Output (Recursion #3)')
|
| 769 |
+
l3_gallery = gr.Gallery(value=[], label="Recursion #3", show_label=False, elem_id="ncut_l3", columns=[3], rows=[5], object_fit="contain", height="auto")
|
| 770 |
with gr.Row():
|
| 771 |
with gr.Column(scale=5, min_width=200):
|
| 772 |
input_gallery, submit_button, clear_images_button = make_input_images_section()
|
|
|
|
| 793 |
num_eig_slider.visible = False
|
| 794 |
affinity_focal_gamma_slider.visible = False
|
| 795 |
# logging text box
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 796 |
with gr.Row():
|
| 797 |
with gr.Column(scale=5, min_width=200):
|
| 798 |
gr.Markdown(' ')
|
requirements.txt
CHANGED
|
@@ -6,6 +6,7 @@ decord
|
|
| 6 |
transformers
|
| 7 |
datasets
|
| 8 |
diffusers
|
|
|
|
| 9 |
hydra-core==1.3.2
|
| 10 |
iopath==0.1.10
|
| 11 |
pillow==9.4.0
|
|
|
|
| 6 |
transformers
|
| 7 |
datasets
|
| 8 |
diffusers
|
| 9 |
+
accelerate
|
| 10 |
hydra-core==1.3.2
|
| 11 |
iopath==0.1.10
|
| 12 |
pillow==9.4.0
|