Spaces:
Running
on
Zero
Running
on
Zero
ZhouwqZJ
commited on
Commit
·
efe30fa
1
Parent(s):
c241698
modified: app.py
Browse files
app.py
CHANGED
|
@@ -38,8 +38,7 @@ def encode(init_image, torch_device, ae):
|
|
| 38 |
init_image = init_image.unsqueeze(0)
|
| 39 |
init_image = init_image.to(torch_device)
|
| 40 |
with torch.no_grad():
|
| 41 |
-
init_image = ae.encode(init_image
|
| 42 |
-
init_image = init_image.to(torch_device)
|
| 43 |
return init_image
|
| 44 |
|
| 45 |
|
|
|
|
| 38 |
init_image = init_image.unsqueeze(0)
|
| 39 |
init_image = init_image.to(torch_device)
|
| 40 |
with torch.no_grad():
|
| 41 |
+
init_image = ae.encode(init_image).to(torch.bfloat16)
|
|
|
|
| 42 |
return init_image
|
| 43 |
|
| 44 |
|