Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,7 +81,7 @@ class FluxEditor:
|
|
| 81 |
self.ae.encoder.to(self.device)
|
| 82 |
|
| 83 |
@torch.inference_mode()
|
| 84 |
-
def encode(init_image, torch_device, ae):
|
| 85 |
init_image = torch.from_numpy(init_image).permute(2, 0, 1).float() / 127.5 - 1
|
| 86 |
init_image = init_image.unsqueeze(0)
|
| 87 |
init_image = init_image.to(torch_device)
|
|
|
|
| 81 |
self.ae.encoder.to(self.device)
|
| 82 |
|
| 83 |
@torch.inference_mode()
|
| 84 |
+
def encode(self, init_image, torch_device, ae):
|
| 85 |
init_image = torch.from_numpy(init_image).permute(2, 0, 1).float() / 127.5 - 1
|
| 86 |
init_image = init_image.unsqueeze(0)
|
| 87 |
init_image = init_image.to(torch_device)
|