Spaces:
Paused
Paused
lllyasviel
commited on
Commit
·
688b30f
1
Parent(s):
7095c8c
- modules/core.py +4 -2
modules/core.py
CHANGED
@@ -64,8 +64,10 @@ def get_previewer(device, latent_format):
|
|
64 |
x_sample = einops.rearrange(x_sample, 'b c h w -> b h w c')
|
65 |
x_sample = x_sample.cpu().numpy()[..., ::-1].copy().clip(0, 255).astype(np.uint8)
|
66 |
for i, s in enumerate(x_sample):
|
67 |
-
|
68 |
-
cv2.
|
|
|
|
|
69 |
cv2.waitKey(1)
|
70 |
|
71 |
taesd.preview = preview_function
|
|
|
64 |
x_sample = einops.rearrange(x_sample, 'b c h w -> b h w c')
|
65 |
x_sample = x_sample.cpu().numpy()[..., ::-1].copy().clip(0, 255).astype(np.uint8)
|
66 |
for i, s in enumerate(x_sample):
|
67 |
+
flag = f'OpenCV Diffusion Preview {i}'
|
68 |
+
cv2.imshow(flag, s)
|
69 |
+
cv2.setWindowTitle(flag, f'Preview {i}, [{step}/{total_steps}]')
|
70 |
+
cv2.setWindowProperty(flag, cv2.WND_PROP_TOPMOST, 1)
|
71 |
cv2.waitKey(1)
|
72 |
|
73 |
taesd.preview = preview_function
|