YangLing0818 / SGDiff

Official implementation for "Diffusion-Based Scene Graph to Image Generation with Masked Contrastive Pre-Training" https://arxiv.org/abs/2211.11138
51 stars 6 forks source link

Taming version and testing problems #4

Open A-BigBao opened 11 months ago

A-BigBao commented 11 months ago

Which version of Taming-transformers should be installed? Is model.ckpt with sip_vg enough for running the test code?

I set line.22 in test_set_ddim_sampler.py and line.44 in config_vg as pretrained/model.ckpt. But the error info shows that the model and the checkpoints do not match.

YangLing0818 commented 11 months ago

Which version of Taming-transformers should be installed? Is model.ckpt with sip_vg enough for running the test code?

I set line.22 in test_set_ddim_sampler.py and line.44 in config_vg as pretrained/model.ckpt. But the error info shows that the model and the checkpoints do not match.

Thanks for your attention. You can try with "pip install taming-transformers==0.0.1 transformers==4.3.1".

A-BigBao commented 11 months ago

Which version of Taming-transformers should be installed? Is model.ckpt with sip_vg enough for running the test code? I set line.22 in test_set_ddim_sampler.py and line.44 in config_vg as pretrained/model.ckpt. But the error info shows that the model and the checkpoints do not match.

Thanks for your attention. You can try with "pip install taming-transformers==0.0.1 transformers==4.3.1".

Thanks for your kind and patient reply. After I installed taming-transformers==0.0.1, the error info is: ImportError: cannot import name 'VectorQuantizer2' from 'taming.modules.vqvae.quantize'

I found that "pip install taming-transformers-rom1504" could fix this problem. However, the mismatch between the ckpt and the model still exists. The error info is: Restored from pretrained/model.ckpt with 0 missing and 49 unexpected keys Restored from pretrained/sip_vg.pt with 0 missing and 308 unexpected keys RuntimeError: Error(s) in loading state_dict for LatentDiffusion:

So I wonder if there are any mistakes I have made when I set the ckpt files and their path.

YangLing0818 commented 11 months ago

Which version of Taming-transformers should be installed? Is model.ckpt with sip_vg enough for running the test code? I set line.22 in test_set_ddim_sampler.py and line.44 in config_vg as pretrained/model.ckpt. But the error info shows that the model and the checkpoints do not match.

Thanks for your attention. You can try with "pip install taming-transformers==0.0.1 transformers==4.3.1".

Thanks for your kind and patient reply. After I installed taming-transformers==0.0.1, the error info is: ImportError: cannot import name 'VectorQuantizer2' from 'taming.modules.vqvae.quantize'

I found that "pip install taming-transformers-rom1504" could fix this problem. However, the mismatch between the ckpt and the model still exists. The error info is: Restored from pretrained/model.ckpt with 0 missing and 49 unexpected keys Restored from pretrained/sip_vg.pt with 0 missing and 308 unexpected keys RuntimeError: Error(s) in loading state_dict for LatentDiffusion:

So I wonder if there are any mistakes I have made when I set the ckpt files and their path.

Please train the model first, then you can run the inference code.

A-BigBao commented 11 months ago

Which version of Taming-transformers should be installed? Is model.ckpt with sip_vg enough for running the test code? I set line.22 in test_set_ddim_sampler.py and line.44 in config_vg as pretrained/model.ckpt. But the error info shows that the model and the checkpoints do not match.

Thanks for your attention. You can try with "pip install taming-transformers==0.0.1 transformers==4.3.1".

Thanks for your kind and patient reply. After I installed taming-transformers==0.0.1, the error info is: ImportError: cannot import name 'VectorQuantizer2' from 'taming.modules.vqvae.quantize' I found that "pip install taming-transformers-rom1504" could fix this problem. However, the mismatch between the ckpt and the model still exists. The error info is: Restored from pretrained/model.ckpt with 0 missing and 49 unexpected keys Restored from pretrained/sip_vg.pt with 0 missing and 308 unexpected keys RuntimeError: Error(s) in loading state_dict for LatentDiffusion: So I wonder if there are any mistakes I have made when I set the ckpt files and their path.

Please train the model first, then you can run the inference code.

Many thanks for your patient reply. And probably there are still some files to be released for training, e.g. scripts.datamodule, since I meet an error during training as follows: ModuleNotFoundError: No module named 'scripts.datamodule'

ZerinHwang03 commented 11 months ago

Which version of Taming-transformers should be installed? Is model.ckpt with sip_vg enough for running the test code? I set line.22 in test_set_ddim_sampler.py and line.44 in config_vg as pretrained/model.ckpt. But the error info shows that the model and the checkpoints do not match.

Thanks for your attention. You can try with "pip install taming-transformers==0.0.1 transformers==4.3.1".

Thanks for your kind and patient reply. After I installed taming-transformers==0.0.1, the error info is: ImportError: cannot import name 'VectorQuantizer2' from 'taming.modules.vqvae.quantize' I found that "pip install taming-transformers-rom1504" could fix this problem. However, the mismatch between the ckpt and the model still exists. The error info is: Restored from pretrained/model.ckpt with 0 missing and 49 unexpected keys Restored from pretrained/sip_vg.pt with 0 missing and 308 unexpected keys RuntimeError: Error(s) in loading state_dict for LatentDiffusion: So I wonder if there are any mistakes I have made when I set the ckpt files and their path.

Please train the model first, then you can run the inference code.

Many thanks for your patient reply. And probably there are still some files to be released for training, e.g. scripts.datamodule, since I meet an error during training as follows: ModuleNotFoundError: No module named 'scripts.datamodule'

We have updated the files, please check.