-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I convert Imagenet checkpoint to a .pkl file to run stylegan2-ada-pytorch? #1
Comments
Hi! Do you use the file from the link from the readme? |
These .pt files do not be used in https://github.com/NVlabs/stylegan2-ada-pytorch . It asks .pkl file. I have to convert pt file to pkl fıle. I searched a litle bit on it and encountered some codes that it show me a way to solve it (https://pytorch.org/tutorials/beginner/saving_loading_models.html) I added some codes in training_loop.py in the stylegan2-ada repo.
Thus, we reach 3 model structure and the we should load our weight to these strucrutes. First we load pt file and matching appropiate weights to related model structure:
Then we have to save this model as pickle file. Pickle file consist of dict objects,create dict then load your model into it:
then save it as pickle:
Then you can use this pkl file to train your gan model in styklegan2 ada repo. If do you know any better solution to use these weights in stylegan2 ada repo. Please let me know. |
Can you upload |
Hi. the paper that you wrote is quite useful for gan training. But I try to use Imagenet checkpoints that you share to run stylegan2-ada-pytorch and then this repo ask me .pkl file to start training. I exported [StyleGAN-ADA-256]. It include folder of 'data', 'data.pkl' and 'version' files. This data.pkl file's size is too little. I think it is pointless to start gan training because similar model files has 100mb or up size. I think that I have to convert 'data' folder to 'data.pkl'. How can I do this?
The text was updated successfully, but these errors were encountered: