Upload app.py
Browse files
app.py
CHANGED
|
@@ -321,12 +321,11 @@ def outpaint_image(image, direction, extend_percent, custom_prompt, progress=gr.
|
|
| 321 |
|
| 322 |
progress(0.05, desc="Analyzing image with BLIP...")
|
| 323 |
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
prompt = build_outpaint_prompt(blip_caption, image)
|
| 330 |
|
| 331 |
base_negative = (
|
| 332 |
"blurry, bad quality, watermark, text, "
|
|
|
|
| 321 |
|
| 322 |
progress(0.05, desc="Analyzing image with BLIP...")
|
| 323 |
|
| 324 |
+
if custom_prompt.strip():
|
| 325 |
+
blip_caption = custom_prompt.strip()
|
| 326 |
+
else:
|
| 327 |
+
blip_caption = get_caption(image)
|
| 328 |
+
prompt = build_outpaint_prompt(blip_caption)
|
|
|
|
| 329 |
|
| 330 |
base_negative = (
|
| 331 |
"blurry, bad quality, watermark, text, "
|