Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -101,8 +101,10 @@ def generate(prompt,
|
|
| 101 |
scale_middle = scale_total.index(0)
|
| 102 |
post_generation_slider_update = gr.update(label=comma_concepts_x, value=0, minimum=scale_min, maximum=scale_max, interactive=True)
|
| 103 |
avg_diff_x = avg_diff.cpu()
|
| 104 |
-
|
| 105 |
-
|
|
|
|
|
|
|
| 106 |
|
| 107 |
def update_pre_generated_images(slider_value, total_images):
|
| 108 |
number_images = len(total_images)
|
|
@@ -174,7 +176,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 174 |
with gr.Column(scale=2, min_width=100):
|
| 175 |
output_image = gr.Video(label="Looping video", elem_id="video", loop=True, autoplay=True)
|
| 176 |
with gr.Accordion(label="Advanced options", open=False):
|
| 177 |
-
interm_steps = gr.Slider(label = "Num of intermediate images", minimum=3, value=
|
| 178 |
with gr.Row():
|
| 179 |
iterations = gr.Slider(label = "Num iterations for clip directions", minimum=0, value=200, maximum=400, step=1)
|
| 180 |
steps = gr.Slider(label = "Num inference steps", minimum=1, value=3, maximum=4, step=1)
|
|
|
|
| 101 |
scale_middle = scale_total.index(0)
|
| 102 |
post_generation_slider_update = gr.update(label=comma_concepts_x, value=0, minimum=scale_min, maximum=scale_max, interactive=True)
|
| 103 |
avg_diff_x = avg_diff.cpu()
|
| 104 |
+
|
| 105 |
+
video_path = f"{uuid.uuid4()}.mp4"
|
| 106 |
+
print(video_path)
|
| 107 |
+
return x_concept_1,x_concept_2, avg_diff_x, export_to_video(images, video_path, fps=5), canvas, images, images[scale_middle], post_generation_slider_update, seed
|
| 108 |
|
| 109 |
def update_pre_generated_images(slider_value, total_images):
|
| 110 |
number_images = len(total_images)
|
|
|
|
| 176 |
with gr.Column(scale=2, min_width=100):
|
| 177 |
output_image = gr.Video(label="Looping video", elem_id="video", loop=True, autoplay=True)
|
| 178 |
with gr.Accordion(label="Advanced options", open=False):
|
| 179 |
+
interm_steps = gr.Slider(label = "Num of intermediate images", minimum=3, value=9, maximum=65, step=2)
|
| 180 |
with gr.Row():
|
| 181 |
iterations = gr.Slider(label = "Num iterations for clip directions", minimum=0, value=200, maximum=400, step=1)
|
| 182 |
steps = gr.Slider(label = "Num inference steps", minimum=1, value=3, maximum=4, step=1)
|