Spaces:
Runtime error
Runtime error
Ray-1026
commited on
Commit
·
d700496
1
Parent(s):
b678d39
add tqdm
Browse files
app.py
CHANGED
|
@@ -281,7 +281,7 @@ def infer(
|
|
| 281 |
# Blur mask
|
| 282 |
# data["mask_img"] = data["mask_img"].filter(ImageFilter.GaussianBlur(15))
|
| 283 |
|
| 284 |
-
# denoise
|
| 285 |
outpaint_result = pipe(
|
| 286 |
prompt=generated_text,
|
| 287 |
negative_prompt="NSFW, (word:1.5), watermark, blurry, missing body, amputation, mutilation",
|
|
@@ -292,8 +292,21 @@ def infer(
|
|
| 292 |
guidance_scale=cfg,
|
| 293 |
generator=generator,
|
| 294 |
repeat_time=repeat_time,
|
|
|
|
| 295 |
).images[0]
|
| 296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 297 |
# save result
|
| 298 |
outpaint_result = np.array(outpaint_result)
|
| 299 |
input_img = np.array(data["input_img"])
|
|
@@ -412,7 +425,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 412 |
|
| 413 |
repeat_time = gr.Slider(
|
| 414 |
label="Repeat time",
|
| 415 |
-
minimum=
|
| 416 |
maximum=4,
|
| 417 |
step=1,
|
| 418 |
value=4,
|
|
|
|
| 281 |
# Blur mask
|
| 282 |
# data["mask_img"] = data["mask_img"].filter(ImageFilter.GaussianBlur(15))
|
| 283 |
|
| 284 |
+
# denoise with tqdm
|
| 285 |
outpaint_result = pipe(
|
| 286 |
prompt=generated_text,
|
| 287 |
negative_prompt="NSFW, (word:1.5), watermark, blurry, missing body, amputation, mutilation",
|
|
|
|
| 292 |
guidance_scale=cfg,
|
| 293 |
generator=generator,
|
| 294 |
repeat_time=repeat_time,
|
| 295 |
+
progress=progress,
|
| 296 |
).images[0]
|
| 297 |
|
| 298 |
+
# outpaint_result = pipe(
|
| 299 |
+
# prompt=generated_text,
|
| 300 |
+
# negative_prompt="NSFW, (word:1.5), watermark, blurry, missing body, amputation, mutilation",
|
| 301 |
+
# image=data["input_img"],
|
| 302 |
+
# mask_image=data["mask_img"],
|
| 303 |
+
# control_image=data["control_img"],
|
| 304 |
+
# num_inference_steps=num_inference_steps,
|
| 305 |
+
# guidance_scale=cfg,
|
| 306 |
+
# generator=generator,
|
| 307 |
+
# repeat_time=repeat_time,
|
| 308 |
+
# ).images[0]
|
| 309 |
+
|
| 310 |
# save result
|
| 311 |
outpaint_result = np.array(outpaint_result)
|
| 312 |
input_img = np.array(data["input_img"])
|
|
|
|
| 425 |
|
| 426 |
repeat_time = gr.Slider(
|
| 427 |
label="Repeat time",
|
| 428 |
+
minimum=0,
|
| 429 |
maximum=4,
|
| 430 |
step=1,
|
| 431 |
value=4,
|