Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -110,7 +110,7 @@ def generate(
|
|
110 |
if not use_negative_prompt_2:
|
111 |
negative_prompt_2 = None # type: ignore
|
112 |
|
113 |
-
|
114 |
images = pipe(
|
115 |
prompt=prompt,
|
116 |
image=img_url,
|
@@ -124,7 +124,7 @@ def generate(
|
|
124 |
generator=generator,
|
125 |
).images[0]
|
126 |
return images
|
127 |
-
|
128 |
images = pipe(
|
129 |
prompt=prompt,
|
130 |
image=init_image,
|
@@ -140,7 +140,7 @@ def generate(
|
|
140 |
output_type="pil",
|
141 |
).images[0]
|
142 |
return images
|
143 |
-
|
144 |
return pipe(
|
145 |
prompt=prompt,
|
146 |
negative_prompt=negative_prompt,
|
|
|
110 |
if not use_negative_prompt_2:
|
111 |
negative_prompt_2 = None # type: ignore
|
112 |
|
113 |
+
if use_inpainting:
|
114 |
images = pipe(
|
115 |
prompt=prompt,
|
116 |
image=img_url,
|
|
|
124 |
generator=generator,
|
125 |
).images[0]
|
126 |
return images
|
127 |
+
elif use_img2img:
|
128 |
images = pipe(
|
129 |
prompt=prompt,
|
130 |
image=init_image,
|
|
|
140 |
output_type="pil",
|
141 |
).images[0]
|
142 |
return images
|
143 |
+
else:
|
144 |
return pipe(
|
145 |
prompt=prompt,
|
146 |
negative_prompt=negative_prompt,
|