Spaces:
Running
on
Zero
Running
on
Zero
Boboiazumi
commited on
Commit
•
f7af116
1
Parent(s):
da3285a
Update app.py
Browse files
app.py
CHANGED
@@ -150,7 +150,8 @@ def generate(
|
|
150 |
"add_quality_tags": add_quality_tags,
|
151 |
"quality_tags": quality_selector,
|
152 |
"isImg2Img": isImg2Img,
|
153 |
-
"img_path": img_path
|
|
|
154 |
}
|
155 |
|
156 |
if use_upscaler:
|
@@ -174,6 +175,7 @@ def generate(
|
|
174 |
try:
|
175 |
if use_upscaler:
|
176 |
if isImg2Img:
|
|
|
177 |
img, img_width, img_height = load_img(512, img_path)
|
178 |
latents = img_pipe(
|
179 |
prompt=prompt,
|
@@ -222,8 +224,9 @@ def generate(
|
|
222 |
).images
|
223 |
else:
|
224 |
if isImg2Img:
|
|
|
225 |
img, img_width, img_height = load_img(512, img_path)
|
226 |
-
images =
|
227 |
prompt=prompt,
|
228 |
negative_prompt=negative_prompt,
|
229 |
width=img_width,
|
@@ -236,7 +239,7 @@ def generate(
|
|
236 |
output_type="pil",
|
237 |
).images
|
238 |
else:
|
239 |
-
images =
|
240 |
prompt=prompt,
|
241 |
negative_prompt=negative_prompt,
|
242 |
width=width,
|
|
|
150 |
"add_quality_tags": add_quality_tags,
|
151 |
"quality_tags": quality_selector,
|
152 |
"isImg2Img": isImg2Img,
|
153 |
+
"img_path": img_path,
|
154 |
+
"img2img_strength": img2img_strength
|
155 |
}
|
156 |
|
157 |
if use_upscaler:
|
|
|
175 |
try:
|
176 |
if use_upscaler:
|
177 |
if isImg2Img:
|
178 |
+
print("Img2Img")
|
179 |
img, img_width, img_height = load_img(512, img_path)
|
180 |
latents = img_pipe(
|
181 |
prompt=prompt,
|
|
|
224 |
).images
|
225 |
else:
|
226 |
if isImg2Img:
|
227 |
+
print("Img2Img")
|
228 |
img, img_width, img_height = load_img(512, img_path)
|
229 |
+
images = img_pipe(
|
230 |
prompt=prompt,
|
231 |
negative_prompt=negative_prompt,
|
232 |
width=img_width,
|
|
|
239 |
output_type="pil",
|
240 |
).images
|
241 |
else:
|
242 |
+
images = pipe(
|
243 |
prompt=prompt,
|
244 |
negative_prompt=negative_prompt,
|
245 |
width=width,
|