nightfury commited on
Commit
7c85a5d
1 Parent(s): 48ec70e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -167,7 +167,8 @@ def predict(radio, dict, word_mask, prompt=""):
167
  mask = Image.fromarray(np.uint8(bw_image)).convert('RGB')
168
  os.remove(filename)
169
 
170
- with autocast(device): #"cuda"
 
171
  images = pipe(prompt = prompt, init_image=init_image, mask_image=mask, strength=0.8)["sample"]
172
  return images[0]
173
 
 
167
  mask = Image.fromarray(np.uint8(bw_image)).convert('RGB')
168
  os.remove(filename)
169
 
170
+ #with autocast(device): #"cuda"
171
+ with autocast(device_type="cpu", dtype=torch.bfloat16):
172
  images = pipe(prompt = prompt, init_image=init_image, mask_image=mask, strength=0.8)["sample"]
173
  return images[0]
174