XingangPan / DragGAN

Official Code for DragGAN (SIGGRAPH 2023)
https://vcai.mpi-inf.mpg.de/projects/DragGAN/
Other
35.65k stars 3.45k forks source link

where to download checkpoints? #151

Open xinmans opened 1 year ago

xinmans commented 1 year ago

Loading "C:\Users\xinmans\DragGAN\checkpoints\stylegan2-car-config-f.pkl"... Failed!

Traceback (most recent call last): File "C:\Users\xinmans\DragGAN\viz\renderer.py", line 138, in get_network with dnnlib.util.open_url(pkl, verbose=False) as f: File "C:\Users\xinmans\DragGAN\dnnlib\util.py", line 403, in open_url return url if return_filename else open(url, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\xinmans\DragGAN\checkpoints\stylegan2-car-config-f.pkl'

kriswangchunyan commented 1 year ago

在scripts脚本里面的dowload_models.json里面有的呢,下载链接:"https://storage.googleapis.com/self-distilled-stylegan/lions_512_pytorch.pkl": "stylegan2_lions_512_pytorch.pkl", "https://storage.googleapis.com/self-distilled-stylegan/dogs_1024_pytorch.pkl": "stylegan2_dogs_1024_pytorch.pkl", "https://storage.googleapis.com/self-distilled-stylegan/horses_256_pytorch.pkl": "stylegan2_horses_256_pytorch.pkl", "https://storage.googleapis.com/self-distilled-stylegan/elephants_512_pytorch.pkl": "stylegan2_elephants_512_pytorch.pkl", "https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan2/versions/1/files/stylegan2-ffhq-512x512.pkl": "stylegan2-ffhq-512x512.pkl", "https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan2/versions/1/files/stylegan2-afhqcat-512x512.pkl": "stylegan2-afhqcat-512x512.pkl", "http://d36zk2xti64re0.cloudfront.net/stylegan2/networks/stylegan2-car-config-f.pkl": "stylegan2-car-config-f.pkl", "http://d36zk2xti64re0.cloudfront.net/stylegan2/networks/stylegan2-cat-config-f.pkl": "stylegan2-cat-config-f.pkl"

radames commented 1 year ago

You can also get them from Hugging Face hub

pip install huggingface_hub
from huggingface_hub import snapshot_download
model_dir = Path('./checkpoints')
snapshot_download('DragGan/DragGan-Models', repo_type='model', local_dir=model_dir)

https://huggingface.co/DragGan/DragGan-Models/tree/main