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

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

Open
qpc1611094 opened this issue Aug 14, 2023 · 2 comments
Open

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

qpc1611094 opened this issue Aug 14, 2023 · 2 comments

Comments

@qpc1611094
Copy link

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
Copy link
Author

I have fixed it, thanks

@just1nseo
Copy link

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

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

2 participants