openai / consistency_models

Official repo for consistency models.
MIT License
6.02k stars 409 forks source link

How to visualize samples stored by np? #24

Open ShyFoo opened 1 year ago

stonecropa commented 1 year ago

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]) imgpath = f'E:/test/images31/sample{i+1}.png' img.save(img_path)

ShyFoo commented 1 year ago

Oh, thanks!

stonecropa commented 1 year ago

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

ShyFoo commented 1 year ago

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