Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -325,9 +325,11 @@ def run(state, drawpad):
|
|
325 |
background = drawpad['background']
|
326 |
if background is None:
|
327 |
background = Image.new(size=(opt.width, opt.height), mode='RGB', color=(255, 255, 255))
|
|
|
328 |
else:
|
329 |
background = background.convert('RGBA')
|
330 |
-
|
|
|
331 |
if not inpainting_mode:
|
332 |
background = Image.new(size=(opt.width, opt.height), mode='RGB', color=(255, 255, 255))
|
333 |
background_prompt = "Simple white background"
|
|
|
325 |
background = drawpad['background']
|
326 |
if background is None:
|
327 |
background = Image.new(size=(opt.width, opt.height), mode='RGB', color=(255, 255, 255))
|
328 |
+
inpainting_mode = False
|
329 |
else:
|
330 |
background = background.convert('RGBA')
|
331 |
+
inpainting_mode = True
|
332 |
+
# inpainting_mode = np.asarray(background).sum() != 0
|
333 |
if not inpainting_mode:
|
334 |
background = Image.new(size=(opt.width, opt.height), mode='RGB', color=(255, 255, 255))
|
335 |
background_prompt = "Simple white background"
|