ibrahimethemhamamci / GenerateCT

ECCV 2024 & GenerateCT: Text-Conditional Generation of 3D Chest CT Volumes
MIT License
133 stars 12 forks source link

Problem with pre-training #11

Closed OvO1111 closed 5 months ago

OvO1111 commented 9 months ago

Hi there, thanks for your great work, I'm currently running into a problem while running train_transformer.py. After downloading the pretrained ct-vit model checkpoint and feeding it to the parameter pretrained_cvivit_path on https://github.com/ibrahimethemhamamci/GenerateCT/blob/main/train_transformer.py#L58, I get RuntimeError: Error(s) in loading state_dict for CTViT: Missing key(s) in state_dict: "vq._codebook.embed_avg". on https://github.com/ibrahimethemhamamci/GenerateCT/blob/main/transformer_maskgit/transformer_maskgit/ctvit.py#L406. I presume there is a problem about the checkpoint file ctvit_pretrained.pt ? Let me know if you have some idea about this error. Thanks in advance!

sezginerr commented 9 months ago

It might be caused by vector_quantize_pytorch version mismatch. Can you try running pip install vector-quantize-pytorch==1.1.2 in your current env? This version should be installed in your env if you run pip install -e for transformer_maskgit though.

sezginerr commented 5 months ago

I am closing this for now. Let us know if you have further question.