mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
i
This commit is contained in:
@@ -151,6 +151,6 @@ with torch.no_grad():
|
|||||||
model.first_stage_model.cpu()
|
model.first_stage_model.cpu()
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
samples = einops.rearrange(samples, 'b c h w -> b h w c')[0, :, :, ::-1] * 255.0
|
samples = einops.rearrange(samples, 'b c h w -> b h w c')[0] * 255.0
|
||||||
samples = samples.cpu().numpy().clip(0, 255).astype(np.uint8)
|
samples = samples.cpu().numpy().clip(0, 255).astype(np.uint8)[:, :, ::-1]
|
||||||
cv2.imwrite('img.png', samples)
|
cv2.imwrite('img.png', samples)
|
||||||
|
|||||||
Reference in New Issue
Block a user