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

DDPM training problem #492

Open
AzureCHEM opened this issue Jan 28, 2023 · 1 comment
Open

DDPM training problem #492

AzureCHEM opened this issue Jan 28, 2023 · 1 comment

Comments

@AzureCHEM
Copy link

Hi,
I'm trying to use celebA-HQ dataset(only images) to train DDPM, and I use unconditional_imgs_flip_256x256.py as the dataset config file,but I always have the following error
image

The training config file I use is as follows. Thank you so much!
image
image

@zeakey
Copy link
Contributor

zeakey commented Feb 27, 2023

Reason

Your dataloader provides a dict with key real_img but in your training config you are accessing the img keyword.

https://github.com/open-mmlab/mmgeneration/blob/master/configs/_base_/datasets/unconditional_imgs_flip_256x256.py#L4

https://github.com/open-mmlab/mmgeneration/blob/master/configs/_base_/models/improved_ddpm/ddpm_32x32.py#L43

Solution:

change train_cfg = dict(use_ema=True, real_img_key='img') to train_cfg = dict(use_ema=True, real_img_key='real_img').

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