multimodalart HF staff commited on
Commit
4e30dae
1 Parent(s): 9e720d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -58,9 +58,9 @@ def predict(radio, dict, word_mask, prompt=""):
58
  cv2.cvtColor(bw_image, cv2.COLOR_BGR2RGB)
59
  mask = Image.fromarray(np.uint8(bw_image)).convert('RGB')
60
  os.remove(filename)
61
- with autocast("cuda"):
62
- images = pipe(prompt = prompt, init_image=init_image, mask_image=mask, strength=0.8)["sample"]
63
- return images[0]
64
 
65
  # examples = [[dict(image="init_image.png", mask="mask_image.png"), "A panda sitting on a bench"]]
66
  css = '''
 
58
  cv2.cvtColor(bw_image, cv2.COLOR_BGR2RGB)
59
  mask = Image.fromarray(np.uint8(bw_image)).convert('RGB')
60
  os.remove(filename)
61
+ #with autocast("cuda"):
62
+ output = pipe(prompt = prompt, init_image=init_image, mask_image=mask, strength=0.8)
63
+ return output.images[0]
64
 
65
  # examples = [[dict(image="init_image.png", mask="mask_image.png"), "A panda sitting on a bench"]]
66
  css = '''