Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -101,7 +101,7 @@ def update_scales(x,prompt,seed, steps, interm_steps, guidance_scale,
|
|
101 |
#guidance_scale=guidance_scale,
|
102 |
scale=cur_scale, seed=seed, num_inference_steps=steps, avg_diff=avg_diff)
|
103 |
images.append(image)
|
104 |
-
canvas = Image.new('RGB', (
|
105 |
for i, im in enumerate(images):
|
106 |
canvas.paste(im.resize((256,256)), (256 * i, 0))
|
107 |
return export_to_gif(images, "clip.gif", fps=5), canvas
|
@@ -179,7 +179,7 @@ with gr.Blocks(css=css) as demo:
|
|
179 |
slider_x = gr.Dropdown(label="Slider concept range", allow_custom_value=True, multiselect=True, max_choices=2)
|
180 |
#slider_y = gr.Dropdown(label="Slider Y concept range", allow_custom_value=True, multiselect=True, max_choices=2)
|
181 |
prompt = gr.Textbox(label="Prompt")
|
182 |
-
x = gr.Slider(minimum=0, value=1.25, step=0.1, maximum=2.5,
|
183 |
submit = gr.Button("find directions")
|
184 |
with gr.Column():
|
185 |
with gr.Group(elem_id="group"):
|
@@ -192,7 +192,7 @@ with gr.Blocks(css=css) as demo:
|
|
192 |
with gr.Accordion(label="advanced options", open=False):
|
193 |
iterations = gr.Slider(label = "num iterations", minimum=0, value=200, maximum=400)
|
194 |
steps = gr.Slider(label = "num inference steps", minimum=1, value=4, maximum=10)
|
195 |
-
interm_steps = gr.Slider(label = "num of intermediate images", minimum=1, value=5, maximum=
|
196 |
guidance_scale = gr.Slider(
|
197 |
label="Guidance scale",
|
198 |
minimum=0.1,
|
|
|
101 |
#guidance_scale=guidance_scale,
|
102 |
scale=cur_scale, seed=seed, num_inference_steps=steps, avg_diff=avg_diff)
|
103 |
images.append(image)
|
104 |
+
canvas = Image.new('RGB', (256*interm_steps, 256))
|
105 |
for i, im in enumerate(images):
|
106 |
canvas.paste(im.resize((256,256)), (256 * i, 0))
|
107 |
return export_to_gif(images, "clip.gif", fps=5), canvas
|
|
|
179 |
slider_x = gr.Dropdown(label="Slider concept range", allow_custom_value=True, multiselect=True, max_choices=2)
|
180 |
#slider_y = gr.Dropdown(label="Slider Y concept range", allow_custom_value=True, multiselect=True, max_choices=2)
|
181 |
prompt = gr.Textbox(label="Prompt")
|
182 |
+
x = gr.Slider(minimum=0, value=1.25, step=0.1, maximum=2.5, interactive=False, info="the strength to scale in each direction")
|
183 |
submit = gr.Button("find directions")
|
184 |
with gr.Column():
|
185 |
with gr.Group(elem_id="group"):
|
|
|
192 |
with gr.Accordion(label="advanced options", open=False):
|
193 |
iterations = gr.Slider(label = "num iterations", minimum=0, value=200, maximum=400)
|
194 |
steps = gr.Slider(label = "num inference steps", minimum=1, value=4, maximum=10)
|
195 |
+
interm_steps = gr.Slider(label = "num of intermediate images", minimum=1, value=5, maximum=65)
|
196 |
guidance_scale = gr.Slider(
|
197 |
label="Guidance scale",
|
198 |
minimum=0.1,
|