Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -87,12 +87,8 @@ def update_scales(x,prompt,seed, steps, guidance_scale,
|
|
| 87 |
images = []
|
| 88 |
img_steps=5
|
| 89 |
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
low_scale = x
|
| 93 |
-
else:
|
| 94 |
-
high_scale = x
|
| 95 |
-
low_scale = 0
|
| 96 |
|
| 97 |
if img2img_type=="controlnet canny" and img is not None:
|
| 98 |
control_img = process_controlnet_img(img)
|
|
@@ -108,8 +104,7 @@ def update_scales(x,prompt,seed, steps, guidance_scale,
|
|
| 108 |
images.append(image)
|
| 109 |
canvas = Image.new('RGB', (1280, 256))
|
| 110 |
for i, im in enumerate(images):
|
| 111 |
-
im.resize((256,256))
|
| 112 |
-
canvas.paste(im, (256 * i, 0))
|
| 113 |
return export_to_gif(images, "clip.gif", fps=5), canvas
|
| 114 |
|
| 115 |
|
|
@@ -188,7 +183,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 188 |
submit = gr.Button("find directions")
|
| 189 |
with gr.Column():
|
| 190 |
with gr.Group(elem_id="group"):
|
| 191 |
-
x = gr.Slider(minimum
|
| 192 |
#y = gr.Slider(minimum=-10, value=0, maximum=10, elem_id="y", interactive=False)
|
| 193 |
output_image = gr.Image(elem_id="image_out")
|
| 194 |
image_seq = gr.Image()
|
|
|
|
| 87 |
images = []
|
| 88 |
img_steps=5
|
| 89 |
|
| 90 |
+
high_scale = x
|
| 91 |
+
low_scale = -1 * x
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
if img2img_type=="controlnet canny" and img is not None:
|
| 94 |
control_img = process_controlnet_img(img)
|
|
|
|
| 104 |
images.append(image)
|
| 105 |
canvas = Image.new('RGB', (1280, 256))
|
| 106 |
for i, im in enumerate(images):
|
| 107 |
+
canvas.paste(im.resize((256,256)), (256 * i, 0))
|
|
|
|
| 108 |
return export_to_gif(images, "clip.gif", fps=5), canvas
|
| 109 |
|
| 110 |
|
|
|
|
| 183 |
submit = gr.Button("find directions")
|
| 184 |
with gr.Column():
|
| 185 |
with gr.Group(elem_id="group"):
|
| 186 |
+
x = gr.Slider(minimum=0, value=0, step=0.1, maximum=2.5, elem_id="x", interactive=False)
|
| 187 |
#y = gr.Slider(minimum=-10, value=0, maximum=10, elem_id="y", interactive=False)
|
| 188 |
output_image = gr.Image(elem_id="image_out")
|
| 189 |
image_seq = gr.Image()
|