Poisson_flow icon indicating copy to clipboard operation
Poisson_flow copied to clipboard

Question with inferencing stage

Open Michael-H777 opened this issue 2 years ago • 2 comments

Hi,

I was able to get the code to run and train on cifar 10. However, I am struggling to understand how would I inference with the model.

Lets say I have a trained model, and a random noise of size (64, 3, 32, 32) (B,C,H,W). how would I use the existing model and the restore_checkpoint('from utils import restore_checkpoint') to create 64 new images?

feel free to refer to any function in the repo.

Thanks, Michael

Michael-H777 avatar Feb 25 '23 22:02 Michael-H777

Hi Michael,

Please use the --config.eval.save_images flag in the command line, as well as setting the eval batch size --config.eval.batch_size to 64. Generated images would be saved to eval_dir/ode_images_{ckpt}.png. Please refer to https://github.com/Newbeeer/Poisson_flow/blob/bb51603b8c1a2b258cd918dbd2fb6802402cefd7/run_lib.py#L472-L476

Please consider using the more advanced PFGM++ model 😃 : https://github.com/Newbeeer/pfgmpp

Best, Yilun

Newbeeer avatar Feb 28 '23 03:02 Newbeeer

For command line of restoration of existing models, please see the Checkpoint section in README.

Newbeeer avatar Feb 28 '23 04:02 Newbeeer