Madiy commited on
Commit
767ff7c
·
verified ·
1 Parent(s): 450ca3d

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
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
- blip_caption = custom_prompt.strip() if custom_prompt.strip() else get_caption(image)
325
-
326
- # BUG 5 FIX: call build_outpaint_prompt with both args
327
- # Previous code called build_prompt(caption) — one arg, wrong function
328
- # Lost B&W detection entirely for all greyscale images
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, "