openai / consistency_models

Official repo for consistency models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to visualize samples stored by np?

ShyFoo opened this issue · comments

commented

#this

import numpy as np
from PIL import Image
import os

npz_path = r'C:\Users\24170\AppData\Local\Temp\openai-2023-04-25-11-41-23-213484\samples_50x256x256x3.npz'
data = np.load(npz_path)

images = data['arr_0']

if not os.path.exists(r'E:/test/images31'):
os.makedirs(r'E:/test/images31')
for i in range(len(images)):
img = Image.fromarray(images[i])
img_path = f'E:/test/images31/sample_{i+1}.png'
img.save(img_path)

Oh, thanks!

commented

@Akhalee
Is the image you generated good or bad, the one I used was terrible. Thanks.

What experiments did you do? Imagenet64? I have not conducted any experiments yet. If I have done, I will let you know.