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

AssertionError #14

Open
feufhd opened this issue Jan 8, 2025 · 1 comment
Open

AssertionError #14

feufhd opened this issue Jan 8, 2025 · 1 comment

Comments

@feufhd
Copy link

feufhd commented Jan 8, 2025

Thanks for your work!
I want to explore diffusion models based on U-DiT, and I met errors during training (The command is: accelerate launch --multi_gpu --main_process_port 12759 --num_processes 16 --mixed_precision fp16 train_accelerate.py --data-path /imagenet/train/ --feature-path=/U-DiT/in1k_features/imagenet_feature --image-size=256 --model=U-DiT-B --epochs=80).

[rank0]: Traceback (most recent call last):
[rank0]: File "/U-DiT/train_accelerate.py", line 303, in
[rank0]: main(args, unparsed)
[rank0]: File "/U-DiT/train_accelerate.py", line 189, in main
[rank0]: dataset = CustomDataset(args.feature_path)
[rank0]: File "/U-DiT/utils/fastdit_kit.py", line 38, in init
[rank0]: assert len(self.features_files) == len(self.features_files) == 1281167 # ImageNet
[rank0]: AssertionError

I'm pretty sure that I've downloaded your given imagenet_feature.tar and unzipped it successfully. I print len(self.features_files) and it is 40031, which is 1/32 of the length of IN1K (1281167). Is it OK to delete the assertion here? Or what else did I neglect?

@YuchuanTian
Copy link
Owner

Before deleting this assertion, just make sure that the total number of features is 1281167. Just concat all features on the batch dimension and check.

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