This commit is contained in:
parent
3bafd2ea6c
commit
379193940b
|
|
@ -64,8 +64,10 @@ def get_previewer(device, latent_format):
|
|||
x_sample = einops.rearrange(x_sample, 'b c h w -> b h w c')
|
||||
x_sample = x_sample.cpu().numpy()[..., ::-1].copy().clip(0, 255).astype(np.uint8)
|
||||
for i, s in enumerate(x_sample):
|
||||
cv2.imshow(f'Preview {i}', s)
|
||||
cv2.setWindowTitle(f'Preview {i}', f'Preview {i}, [{step}/{total_steps}]')
|
||||
flag = f'OpenCV Diffusion Preview {i}'
|
||||
cv2.imshow(flag, s)
|
||||
cv2.setWindowTitle(flag, f'Preview {i}, [{step}/{total_steps}]')
|
||||
cv2.setWindowProperty(flag, cv2.WND_PROP_TOPMOST, 1)
|
||||
cv2.waitKey(1)
|
||||
|
||||
taesd.preview = preview_function
|
||||
|
|
|
|||
Loading…
Reference in New Issue