lllyasviel
commited on
Commit
·
d3090bd
1
Parent(s):
e0c2c01
- modules/core.py +1 -1
modules/core.py
CHANGED
@@ -66,7 +66,7 @@ def get_previewer(device, latent_format):
|
|
66 |
def preview_function(x0, step, total_steps):
|
67 |
global cv2_is_top
|
68 |
with torch.no_grad():
|
69 |
-
x_sample = taesd.decoder(x0).detach() * 255.0
|
70 |
x_sample = einops.rearrange(x_sample, 'b c h w -> b h w c')
|
71 |
x_sample = x_sample.cpu().numpy()[..., ::-1].copy().clip(0, 255).astype(np.uint8)
|
72 |
for i, s in enumerate(x_sample):
|
|
|
66 |
def preview_function(x0, step, total_steps):
|
67 |
global cv2_is_top
|
68 |
with torch.no_grad():
|
69 |
+
x_sample = taesd.decoder(torch.nn.functional.avg_pool2d(x0, kernel_size=(2, 2))).detach() * 255.0
|
70 |
x_sample = einops.rearrange(x_sample, 'b c h w -> b h w c')
|
71 |
x_sample = x_sample.cpu().numpy()[..., ::-1].copy().clip(0, 255).astype(np.uint8)
|
72 |
for i, s in enumerate(x_sample):
|