Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -780,7 +780,7 @@ def generate_image(
|
|
| 780 |
init_image = init_image[..., : 16 * (h // 16), : 16 * (w // 16)]
|
| 781 |
height = init_image.shape[-2]
|
| 782 |
width = init_image.shape[-1]
|
| 783 |
-
init_image = ae.encode(init_image.to(torch_device)).latent_dist.sample()
|
| 784 |
init_image = (init_image - ae.config.shift_factor) * ae.config.scaling_factor
|
| 785 |
|
| 786 |
generator = torch.Generator(device=device).manual_seed(seed)
|
|
|
|
| 780 |
init_image = init_image[..., : 16 * (h // 16), : 16 * (w // 16)]
|
| 781 |
height = init_image.shape[-2]
|
| 782 |
width = init_image.shape[-1]
|
| 783 |
+
init_image = ae.encode(init_image.to(torch_device).to(torch.bfloat16)).latent_dist.sample()
|
| 784 |
init_image = (init_image - ae.config.shift_factor) * ae.config.scaling_factor
|
| 785 |
|
| 786 |
generator = torch.Generator(device=device).manual_seed(seed)
|