PyTorch-StudioGAN
PyTorch-StudioGAN copied to clipboard
How to run the predict process
thank you for your awesome work! could you please tell me how can i run the predict process?i don't want to run the train or eval process,but only want to run some generated images out
After downloading a pre-trained checkpoint,
CUDA_VISIBLE_DEVICES=0 python3 src/main.py -cfg CONFIG_PATH -save SAVE_DIR -ckpt CKPT_PATH -sf
will lead you to watch awesome results.
After downloading a pre-trained checkpoint,
CUDA_VISIBLE_DEVICES=0 python3 src/main.py -cfg CONFIG_PATH -save SAVE_DIR -ckpt CKPT_PATH -sf
will lead you to watch awesome results.
I can't get the results.
I have such a problem that data sets are required, but inference process does not require data sets
There's little bit of problem in saving fake images with current master branch.
I've tweaked few codes to make -sf option work temporarily. You can use the branch in https://github.com/alex4727/PyTorch-StudioGAN with following command.
CUDA_VISIBLE_DEVICES=0 python3 src/main.py -cfg CONFIG_PATH -save SAVE_DIR -ckpt CKPT_PATH -sf -sf_num NUMBER_OF_IMAGES_TO_GENERATE -metrics none
Note that although StudioGAN saves only "-sf_num" specified numbers of images, StudioGAN produces images using batch_size specified in config since a lot of GANs heavily rely on batch statistics. Thus, if you encounter gpu memory problem try lowering batch_size specified in config.
We'll try to fix problems in current master branch as soon as possible.
There's little bit of problem in saving fake images with current master branch. I've tweaked few codes to make -sf option work temporarily. You can use the branch in https://github.com/alex4727/PyTorch-StudioGAN with following command.
CUDA_VISIBLE_DEVICES=0 python3 src/main.py -cfg CONFIG_PATH -save SAVE_DIR -ckpt CKPT_PATH -sf -sf_num NUMBER_OF_IMAGES_TO_GENERATE -metrics noneNote that although StudioGAN saves only "-sf_num" specified numbers of images, StudioGAN produces images using batch_size specified in config since a lot of GANs heavily rely on batch statistics. Thus, if you encounter gpu memory problem try lowering batch_size specified in config. We'll try to fix problems in current master branch as soon as possible.
thanks!now I can get the result
I will reflect the suggestion by Alex ASAP.
Thank you.
Hello,sir! I use the command:
CUDA_VISIBLE_DEVICES=0 python3 src/main.py -cfg ./src/configs/CIFAR10/ReACGAN-CR.yaml -save ./SAVE -ckpt ./model=G-best-weights-step=82000.pth -sf -sf_num 10 -metrics none
I want to run some generated images out, not to run the train or eval process, but there happens :
TypeError: expected str, bytes or os.PathLike object, not NoneType

could you know what can I do to deal with it? Thanks
@alex4727 it seems the issue still exists for generating samples
Hello, have you fixed the issue?
Can you do the process again after pulling the master branch to your local?
Thanks.
Hi, I have tried again to sample from the latest version of the code present in the repository but I still get the same issue.
Running :
python3 src/main.py -cfg ./configs/ImageNet/BigGAN-256.yaml -save ./SAVE -ckpt ./ImageNet_tailored/ImageNet-BigGAN-256-train-2022_02_13_09_14_45/model=G-best-weights-step=200000.pth -sf -sf_num 10 -metrics none
I get the following error:
TypeError: expected str, bytes or os.PathLike object, not NoneType in the same line as the previous user.