CompVis / taming-transformers

Taming Transformers for High-Resolution Image Synthesis
https://arxiv.org/abs/2012.09841
MIT License
5.83k stars 1.15k forks source link

'VQModel' object has no attribute 'transformer' #240

Open Gannn12138 opened 9 months ago

Gannn12138 commented 9 months ago

Traceback (most recent call last): File "scripts/sample_fast.py", line 261, in <module> given_classes=given_classes, num_samples=opt.num_samples, top_p=opt.top_p) File "/home/ma-user/anaconda3/envs/PyTorch-1.11.0/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "scripts/sample_fast.py", line 83, in run logs = sample_unconditional(model, batch_size=bs, temperature=temperature, top_k=top_k, top_p=top_p) File "/home/ma-user/anaconda3/envs/PyTorch-1.11.0/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "scripts/sample_fast.py", line 53, in sample_unconditional index_sample = sample_with_past(c_indices, model.transformer, steps=steps, File "/home/ma-user/anaconda3/envs/PyTorch-1.11.0/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1186, in __getattr__ type(self).__name__, name))