lllyasviel commited on
Commit
688b30f
·
1 Parent(s): 7095c8c
Files changed (1) hide show
  1. 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
- cv2.imshow(f'Preview {i}', s)
68
- cv2.setWindowTitle(f'Preview {i}', f'Preview {i}, [{step}/{total_steps}]')
 
 
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