mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
i
This commit is contained in:
+4
-2
@@ -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 = 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)
|
x_sample = x_sample.cpu().numpy()[..., ::-1].copy().clip(0, 255).astype(np.uint8)
|
||||||
for i, s in enumerate(x_sample):
|
for i, s in enumerate(x_sample):
|
||||||
cv2.imshow(f'Preview {i}', s)
|
flag = f'OpenCV Diffusion Preview {i}'
|
||||||
cv2.setWindowTitle(f'Preview {i}', f'Preview {i}, [{step}/{total_steps}]')
|
cv2.imshow(flag, s)
|
||||||
|
cv2.setWindowTitle(flag, f'Preview {i}, [{step}/{total_steps}]')
|
||||||
|
cv2.setWindowProperty(flag, cv2.WND_PROP_TOPMOST, 1)
|
||||||
cv2.waitKey(1)
|
cv2.waitKey(1)
|
||||||
|
|
||||||
taesd.preview = preview_function
|
taesd.preview = preview_function
|
||||||
|
|||||||
Reference in New Issue
Block a user