ginipick commited on
Commit
541adaa
·
verified ·
1 Parent(s): 7ae084c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -342,6 +342,8 @@ def process_prompt(img: Image.Image, prompt: str, bg_prompt: str | None = None,
342
  if img is None or not prompt or prompt.isspace():
343
  raise gr.Error("Please provide both image and prompt")
344
 
 
 
345
  # 입력 이미지 크기 제한
346
  max_size = 1024
347
  if img.width > max_size or img.height > max_size:
@@ -362,7 +364,7 @@ def process_prompt(img: Image.Image, prompt: str, bg_prompt: str | None = None,
362
  foreground=results[2],
363
  background=results[1],
364
  position=position,
365
- scale_percent=scale_slider
366
  )
367
  return combined, results[2]
368
  except Exception as e:
@@ -550,7 +552,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
550
  scale_slider = gr.Slider(
551
  minimum=10,
552
  maximum=200,
553
- value=50,
554
  step=5,
555
  label="Object Size (%)"
556
  )
 
342
  if img is None or not prompt or prompt.isspace():
343
  raise gr.Error("Please provide both image and prompt")
344
 
345
+ print(f"Processing with position: {position}, scale: {scale_percent}") # 디버깅용
346
+
347
  # 입력 이미지 크기 제한
348
  max_size = 1024
349
  if img.width > max_size or img.height > max_size:
 
364
  foreground=results[2],
365
  background=results[1],
366
  position=position,
367
+ scale_percent=scale_percent # scale_slider가 아닌 scale_percent 사용
368
  )
369
  return combined, results[2]
370
  except Exception as e:
 
552
  scale_slider = gr.Slider(
553
  minimum=10,
554
  maximum=200,
555
+ value=100,
556
  step=5,
557
  label="Object Size (%)"
558
  )