Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -127,35 +127,6 @@ def generate(
|
|
127 |
generator=generator,
|
128 |
).images[0]
|
129 |
return image
|
130 |
-
elif use_img2img:
|
131 |
-
images = pipe(
|
132 |
-
prompt=prompt,
|
133 |
-
image=init_image,
|
134 |
-
strength=strength_img2img,
|
135 |
-
negative_prompt=negative_prompt,
|
136 |
-
prompt_2=prompt_2,
|
137 |
-
negative_prompt_2=negative_prompt_2,
|
138 |
-
width=width,
|
139 |
-
height=height,
|
140 |
-
guidance_scale=guidance_scale_base,
|
141 |
-
num_inference_steps=num_inference_steps_base,
|
142 |
-
generator=generator,
|
143 |
-
output_type="pil",
|
144 |
-
).images[0]
|
145 |
-
return images
|
146 |
-
else:
|
147 |
-
return pipe(
|
148 |
-
prompt=prompt,
|
149 |
-
negative_prompt=negative_prompt,
|
150 |
-
prompt_2=prompt_2,
|
151 |
-
negative_prompt_2=negative_prompt_2,
|
152 |
-
width=width,
|
153 |
-
height=height,
|
154 |
-
guidance_scale=guidance_scale_base,
|
155 |
-
num_inference_steps=num_inference_steps_base,
|
156 |
-
generator=generator,
|
157 |
-
output_type="pil",
|
158 |
-
).images[0]
|
159 |
|
160 |
with gr.Blocks(theme=gr.themes.Soft(), css="style.css") as demo:
|
161 |
gr.HTML(
|
|
|
127 |
generator=generator,
|
128 |
).images[0]
|
129 |
return image
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
with gr.Blocks(theme=gr.themes.Soft(), css="style.css") as demo:
|
132 |
gr.HTML(
|