Rayhane-mamah / Efficient-VDVAE

Official Pytorch and JAX implementation of "Efficient-VDVAE: Less is more"
https://arxiv.org/abs/2203.13751
MIT License
190 stars 23 forks source link

Unconditional generation without dataset #8

Open turian opened 2 years ago

turian commented 2 years ago

I want to do unconditional generation from checkpoints and logs WITHOUT needing to download the original dataset. How?


Traceback (most recent call last):
  File "synthesize.py", line 345, in <module>
    main()
  File "synthesize.py", line 329, in main
    data_loader = synth_data()
  File "synthesize.py", line 271, in synth_data
    return synth_generic_data()
  File "/content/Efficient-VDVAE/efficient_vdvae_torch/data/generic_data_loader.py", line 143, in synth_generic_data
    synth_images, synth_filenames = create_filenames_list(hparams.data.synthesis_data_path)
  File "/content/Efficient-VDVAE/efficient_vdvae_torch/data/generic_data_loader.py", line 68, in create_filenames_list
    filenames = sorted(os.listdir(path))
FileNotFoundError: [Errno 2] No such file or directory: '../datasets/celebAHQ/val_data/'
Vanlogh commented 2 years ago

Hello @turian,

Thank you for your question. Sorry if we didn't make this clear enough in this ReadMe section. You should set the synthesis_mode in efficient_vdvae_torch or efficient_vdvae_jax/hparams.cfg in [synthesis] section to 'generation' in order to be able to do unconditional generation.

You should not get this error because the data_loader argument is set to None, if you specify 'generation' in synthesis_mode as you can see from this snippet of code in synthesize.py. Most likely, you are trying to use 'reconstruction' mode which calculate the NLL on your test_set, so it obviously requires having the original dataset.

Hopefully this makes it clear :)

Thank you, Louay Hazami