YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
Projected GAN
weights
- https://s3.eu-central-1.amazonaws.com/avg-projects/projected_gan/models/art_painting.pkl
- https://s3.eu-central-1.amazonaws.com/avg-projects/projected_gan/models/church.pkl
- https://s3.eu-central-1.amazonaws.com/avg-projects/projected_gan/models/bedroom.pkl
- https://s3.eu-central-1.amazonaws.com/avg-projects/projected_gan/models/cityscapes.pkl
- https://s3.eu-central-1.amazonaws.com/avg-projects/projected_gan/models/clevr.pkl
- https://s3.eu-central-1.amazonaws.com/avg-projects/projected_gan/models/ffhq.pkl
- https://s3.eu-central-1.amazonaws.com/avg-projects/projected_gan/models/flowers.pkl
- https://s3.eu-central-1.amazonaws.com/avg-projects/projected_gan/models/landscape.pkl
- https://s3.eu-central-1.amazonaws.com/avg-projects/projected_gan/models/pokemon.pkl
import pathlib
import pickle
import sys
sys.path.insert(0, '~/codes/clones/projected_gan')
import dnnlib
import legacy
paths = sorted(pathlib.Path('orig'))
out_dir = pathlib.Path('models')
out_dir.mkdir()
for path in paths:
with dnnlib.util.open_url(path.as_posix()) as f:
model = legacy.load_network_pkl(f)['G_ema'].to('cpu')
ckpt = {'G_ema': model}
outpath = out_dir / path.name
with open(outpath, 'wb') as f:
pickle.dump(ckpt, f)