Self-Distilled StyleGAN: Towards Generation from Internet Photos
Paper
โข
2202.12211
โข
Published
import pathlib
import pickle
sys.path.insert(0, '~/codes/clones/stylegan3')
paths = sorted(pathlib.Path('orig/').glob('*'))
out_dir = pathlib.Path('models')
out_dir.mkdir()
for path in paths:
with open(path, 'rb') as f:
ckpt = pickle.load(f)
for key in list(ckpt.keys()):
if key != 'G_ema':
del ckpt[key]
out_path = out_dir / path.name
with open(out_path, 'wb') as f:
pickle.dump(ckpt, f)