Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
|