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

Is there anyone success to train this model? #34

Open
Jihun999 opened this issue Feb 16, 2024 · 13 comments
Open

Is there anyone success to train this model? #34

Jihun999 opened this issue Feb 16, 2024 · 13 comments

Comments

@Jihun999
Copy link

I tried to train this model few days. However, the reconstruction results always abnormal. If there is anyone success to train this model, can you tell me some tips for training?

@Jihun999 Jihun999 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2024
@Jihun999 Jihun999 reopened this Feb 16, 2024
@Jihun999
Copy link
Author

The reconstruction images are like solid image.

@RobertLuo1
Copy link

RobertLuo1 commented Feb 20, 2024

Can you show the reconstruction images after training?

@Jihun999
Copy link
Author

example_image It always looks like this image.

@RobertLuo1
Copy link

@bridenmj How much epochs do you use? Are you working on the ImageNet Pretrain?

@Jihun999
Copy link
Author

Yes I'm working on ImageNet pretraining, It passed 12000 steps. The output image looks always the same. So, I tried LFQ in my own autoencoder, the training works well. It looks like there is something wrong in magvit2 model architecture.

@RobertLuo1
Copy link

Actually I reimplement the model structure to align with the magvit2 paper. But I find that the LFQ Loss is negative and the recon loss will get converage easily with or without GAN. The reconstructed images are vague but not the solid color. What about you? @Jihun999

@Jihun999
Copy link
Author

Ok, I will reimplement the model first. Thank you for your comment.

@Jason3900
Copy link

Actually I reimplement the model structure to align with the magvit2 paper. But I find that the LFQ Loss is negative and the recon loss will get converage easily with or without GAN. The reconstructed images are vague but not the solid color. What about you? @Jihun999

Hey, is it possible to share the code modification for model architecture alignment? Thanks a lot!

@lucidrains
Copy link
Owner

someone i know has trained it successfully.

@Jiushanhuadao
Copy link

wow, could i know who did it.

@StarCycle
Copy link

@RobertLuo1 @Jihun999 @lucidrains If you successfully trained this model, would you like to share the pretrained weights and the modified model code?

@vinyesm
Copy link

vinyesm commented May 16, 2024

Hello there,
Thanks @lucidrains for your work! I have successful trainings on toy data (tried it on images and video) with code in this fork https://github.com/vinyesm/magvit2-pytorch/blob/trainvideo/examples/train-on-video.py and with this video data https://huggingface.co/datasets/mavi88/phys101_frames/tree/main. What seemed to fix the issue is to stop using accelerate (I only train on one GPU).

I tried with only MSE and then also the other losses, and also with/without attend_space layers. All work but I did not try to tune hyperparameters..

Screenshot 2024-05-16 at 21 40 57 Screenshot 2024-05-16 at 21 44 15

@lucidrains
Copy link
Owner

thank you for sharing this Marina! I'll see if I can find the bug, and worse comes to worse, can always rewrite the training code in pytorch lightning

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

7 participants