rinongal / textual_inversion

MIT License
2.87k stars 278 forks source link

AttributeError: 'NoneType' object has no attribute 'load' #157

Open qpc1611094 opened 11 months ago

qpc1611094 commented 11 months ago

I have trained a model with python main.py --base /path/textual_inversion/configs/latent-diffusion/txt2img-1p4B-finetune.yaml -t --actual_resume /path/textual_inversion/models/ldm/text2img-large/model.ckpt -n project_v1 --gpus 0, --data_root /path/inputs/

and test with: python scripts/txt2img.py --ddim_eta 0.0 --n_samples 8 --n_iter 2 --scale 10.0 --ddim_steps 50 --embedding_path /path/checkpoints/embeddings_gs-5999.pt --ckpt_path /path/textual_inversion/models/ldm/text2img-large/model.ckpt --prompt "a photo of *"

but I get an error as: Loading model from /path/textual_inversion/models/ldm/text2img-large/model.ckpt LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 872.30 M params. making attention of type 'vanilla' with 512 in_channels Working with z of shape (1, 4, 32, 32) = 4096 dimensions. making attention of type 'vanilla' with 512 in_channels Traceback (most recent call last): File "scripts/txt2img.py", line 132, in model.embedding_manager.load(opt.embedding_path) AttributeError: 'NoneType' object has no attribute 'load'

it seems like no embedding_manager in my model, how can I fix it?

qpc1611094 commented 11 months ago

I have fixed it, thanks

just1nseo commented 2 months ago

@qpc1611094 hello, i am having the same issue. How did you fix this issue may i ask ?