Skip to content
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

Running your code on FFHQ 1024 #4

Open
yaseryacoob opened this issue Jan 17, 2022 · 4 comments
Open

Running your code on FFHQ 1024 #4

yaseryacoob opened this issue Jan 17, 2022 · 4 comments

Comments

@yaseryacoob
Copy link

Thanks for sharing your code, I am trying to compare the performance of your code to Songs on the FFHQ1024x1024 data. You seem to have a config file ffhq.py that might do that. I am not sure how to test this, I also see the need for ffhq-r10.tfrecords and not sure on the checkpoint and options for the call.

Can you please provide suggestions?
thanks

@AlexiaJM
Copy link
Owner

Hi Yaser,

You can use the lines of code here

## FFHQ experiments
to compare the various different sampling methods on FFHQ-256. You'll want to replace ffhq_256.py with ffhq.py in the lines of code.

Based on the paper, for optimal results, you'll want to use this line:

python main.py --config 'configs/ncsnpp/ffhq_256.py' --mode 'eval' --workdir 'ffhq_256_ncsnpp_continuous' --config.sampling.predictor="adaptive" --config.sampling.corrector="none" --config.eval.num_samples=$total_highres --config.eval.batch_size=$bs_highres --config.sampling.abstol=0.0039 --config.sampling.reltol=1e-2

You can download FFHQ from https://github.com/NVlabs/ffhq-dataset.

@yaseryacoob
Copy link
Author

Alexia, thanks for the quick response. Let's clarify

  1. I was planning to just run the evaluation part to compare performance with respect to Song's pytorch checkpoint_60.pth (for FFHQ1kx1K). So I am not sure I understand why FFHQ data is needed for this.
  2. If I understand your comments, I will have to train on the FFHQ, before I get to step 1? I didn't see any reference to a pretrained check point (I assumed checkpoint_60 might be used with your SDE solver).
  3. I have the FFHQ 1K1K dataset but not the multi-resolution tfrecords. I would expect the training on Full FFHQ to take enormous amount of time?

thanks for further clarifications.

@AlexiaJM
Copy link
Owner

  1. You need the real data to calculate the FID. Assuming you already have the FID and don't have eval.enable_loss=False, you could just comment out the line
    _, eval_ds, _ = datasets.get_dataset(config, additional_dim=1, evaluation=True,
    and things should work without the dataset. But the problem is that I have never computed that FID statistics, so you will need to compute the FID stats with the correct dataset (tfrecords).
  2. You do not need to train, it is only used for the FID calculation. You can use the checkpoint https://drive.google.com/drive/folders/1GwcthBS4Ry54eA_fIg1hOCfThQ6I3u1L and change workdir to 'ffhq_1024_ncsnpp_continuous' which is the folder containing the checkpoint

@yaseryacoob
Copy link
Author

Thanks Alexia, I tried this route, but the ml-collections and absl seem to have some issues beyond my knowledge. I will let go of it for now and revisit it in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants