Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -316,9 +316,11 @@ def run(state, drawpad):
|
|
| 316 |
background = drawpad['background']
|
| 317 |
if background is None:
|
| 318 |
background = Image.new(size=(opt.width, opt.height), mode='RGB', color=(255, 255, 255))
|
|
|
|
| 319 |
else:
|
| 320 |
background = background.convert('RGBA')
|
| 321 |
-
|
|
|
|
| 322 |
if not inpainting_mode:
|
| 323 |
background = Image.new(size=(opt.width, opt.height), mode='RGB', color=(255, 255, 255))
|
| 324 |
background_prompt = "Simple white background"
|
|
@@ -375,7 +377,7 @@ def run(state, drawpad):
|
|
| 375 |
background_negative_prompt=state.neg_prompts[0],
|
| 376 |
height=opt.height,
|
| 377 |
width=opt.width,
|
| 378 |
-
bootstrap_steps=
|
| 379 |
guidance_scale=0,
|
| 380 |
)
|
| 381 |
|
|
|
|
| 316 |
background = drawpad['background']
|
| 317 |
if background is None:
|
| 318 |
background = Image.new(size=(opt.width, opt.height), mode='RGB', color=(255, 255, 255))
|
| 319 |
+
inpainting_mode = False
|
| 320 |
else:
|
| 321 |
background = background.convert('RGBA')
|
| 322 |
+
inpainting_mode = True
|
| 323 |
+
# inpainting_mode = np.asarray(background).sum() != 0
|
| 324 |
if not inpainting_mode:
|
| 325 |
background = Image.new(size=(opt.width, opt.height), mode='RGB', color=(255, 255, 255))
|
| 326 |
background_prompt = "Simple white background"
|
|
|
|
| 377 |
background_negative_prompt=state.neg_prompts[0],
|
| 378 |
height=opt.height,
|
| 379 |
width=opt.width,
|
| 380 |
+
bootstrap_steps=1,
|
| 381 |
guidance_scale=0,
|
| 382 |
)
|
| 383 |
|