ironjr commited on
Commit
5224ddc
·
verified ·
1 Parent(s): 5f1c435

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- inpainting_mode = np.asarray(background).sum() != 0
 
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"