lllyasviel commited on
Commit
7143830
·
1 Parent(s): 20f349b
Files changed (1) hide show
  1. entry.py +2 -2
entry.py CHANGED
@@ -151,6 +151,6 @@ with torch.no_grad():
151
  model.first_stage_model.cpu()
152
 
153
  import cv2
154
- samples = einops.rearrange(samples, 'b c h w -> b h w c')[0, :, :, ::-1] * 255.0
155
- samples = samples.cpu().numpy().clip(0, 255).astype(np.uint8)
156
  cv2.imwrite('img.png', samples)
 
151
  model.first_stage_model.cpu()
152
 
153
  import cv2
154
+ samples = einops.rearrange(samples, 'b c h w -> b h w c')[0] * 255.0
155
+ samples = samples.cpu().numpy().clip(0, 255).astype(np.uint8)[:, :, ::-1]
156
  cv2.imwrite('img.png', samples)