Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,10 @@ MAX_IMAGE_SIZE = 2048
|
|
20 |
|
21 |
|
22 |
def round_to_nearest_resolution_acceptable_by_vae(height, width):
|
|
|
23 |
height = height - (height % pipe.vae_temporal_compression_ratio)
|
24 |
width = width - (width % pipe.vae_temporal_compression_ratio)
|
|
|
25 |
return height, width
|
26 |
|
27 |
def change_mode_to_text():
|
@@ -176,8 +178,8 @@ with gr.Blocks(css=css, theme=gr.themes.Ocean()) as demo:
|
|
176 |
steps = gr.Slider(label="Steps", minimum=1, maximum=30, value=8, step=1)
|
177 |
num_frames = gr.Slider(label="# frames", minimum=1, maximum=161, value=96, step=1)
|
178 |
with gr.Row():
|
179 |
-
height = gr.Slider(label="height", value=512, step=1)
|
180 |
-
width = gr.Slider(label="width", value=704, step=1)
|
181 |
|
182 |
|
183 |
text_tab.select(fn=change_mode_to_text, inputs=[], outputs=[mode])
|
|
|
20 |
|
21 |
|
22 |
def round_to_nearest_resolution_acceptable_by_vae(height, width):
|
23 |
+
print("before rounding",height, width)
|
24 |
height = height - (height % pipe.vae_temporal_compression_ratio)
|
25 |
width = width - (width % pipe.vae_temporal_compression_ratio)
|
26 |
+
print("after rounding",height, width)
|
27 |
return height, width
|
28 |
|
29 |
def change_mode_to_text():
|
|
|
178 |
steps = gr.Slider(label="Steps", minimum=1, maximum=30, value=8, step=1)
|
179 |
num_frames = gr.Slider(label="# frames", minimum=1, maximum=161, value=96, step=1)
|
180 |
with gr.Row():
|
181 |
+
height = gr.Slider(label="height", value=512, step=1, maximum=2048)
|
182 |
+
width = gr.Slider(label="width", value=704, step=1, maximum=2048)
|
183 |
|
184 |
|
185 |
text_tab.select(fn=change_mode_to_text, inputs=[], outputs=[mode])
|