stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: 'NoneType' object has no attribute 'cond_stage_model'
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Error when prompt after install extension
Steps to reproduce the problem
- launch webUI
- insert some prompt
What should have happened?
do not error
Commit where the problem happens
3715ece0adce7bf7c5e9c5ab3710b2fdc3848f39
What platforms do you use to access the UI ?
Linux
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
--ui-debug-mode
List of extensions
sd-webui-controlnet unprompted
Console logs
Traceback (most recent call last):
File "/home/qingdu/stable-diffusion-webui/modules/call_queue.py", line 56, in f
res = list(func(*args, **kwargs))
File "/home/qingdu/stable-diffusion-webui/modules/call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "/home/qingdu/stable-diffusion-webui/modules/txt2img.py", line 56, in txt2img
processed = process_images(p)
File "/home/qingdu/stable-diffusion-webui/modules/processing.py", line 486, in process_images
res = process_images_inner(p)
File "/home/qingdu/stable-diffusion-webui/modules/processing.py", line 544, in process_images_inner
model_hijack.embedding_db.load_textual_inversion_embeddings()
File "/home/qingdu/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 229, in load_textual_inversion_embeddings
self.expected_shape = self.get_expected_shape()
File "/home/qingdu/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 140, in get_expected_shape
vec = shared.sd_model.cond_stage_model.encode_embedding_init_text(",", 1)
AttributeError: 'NoneType' object has no attribute 'cond_stage_model'
Traceback (most recent call last):
File "/home/qingdu/stable-diffusion-webui/modules/call_queue.py", line 56, in f
res = list(func(*args, **kwargs))
File "/home/qingdu/stable-diffusion-webui/modules/call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "/home/qingdu/stable-diffusion-webui/modules/txt2img.py", line 56, in txt2img
processed = process_images(p)
File "/home/qingdu/stable-diffusion-webui/modules/processing.py", line 486, in process_images
res = process_images_inner(p)
File "/home/qingdu/stable-diffusion-webui/modules/processing.py", line 544, in process_images_inner
model_hijack.embedding_db.load_textual_inversion_embeddings()
File "/home/qingdu/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 229, in load_textual_inversion_embeddings
self.expected_shape = self.get_expected_shape()
File "/home/qingdu/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 140, in get_expected_shape
vec = shared.sd_model.cond_stage_model.encode_embedding_init_text(",", 1)
AttributeError: 'NoneType' object has no attribute 'cond_stage_model'
Any work on this? This is currently making my Pytorch 2.0 environment unusble.
I meet this error recently, and turn out it is because of the broken safetensors
file, check the sha256 and download the correct one, and the issue is gone.
我最近遇到了这个错误,原来是因为文件损坏了,检查sha256并下载正确的文件,问题就消失了。
safetensors
Yes, that's the reason
I meet this error recently, and turn out it is because of the broken
safetensors
file, check the sha256 and download the correct one, and the issue is gone.
Sorry, but what is the sha256?
I meet this error recently, and turn out it is because of the broken
safetensors
file, check the sha256 and download the correct one, and the issue is gone.Sorry, but what is the sha256?
A checksum to confirm that the file you downloaded to your machine matches the file on the server
I meet this error recently, and turn out it is because of the broken
safetensors
file, check the sha256 and download the correct one, and the issue is gone.Sorry, but what is the sha256?
A checksum to confirm that the file you downloaded to your machine matches the file on the server
sorry, how to checksum
这个问题是怎么解决的?
I meet this error recently, and turn out it is because of the broken
safetensors
file, check the sha256 and download the correct one, and the issue is gone.
how to download that file??
Hello I got same problem when I click Checkpoint or Lora tabs sometimes cant see models, sometimes can see! What should I must do! :)
I meet this error recently, and turn out it is because of the broken
safetensors
file, check the sha256 and download the correct one, and the issue is gone.how to download that file??
safetensors are one of the common formats for Stable Diffusion model files. There is no specific "safetensors", but depends on the one you're using at the moment. I seems that a corrupt safetensors model file was what was causing the issue for @zwpaper
I meet this error recently, and turn out it is because of the broken
safetensors
file, check the sha256 and download the correct one, and the issue is gone.Sorry, but what is the sha256?
A checksum to confirm that the file you downloaded to your machine matches the file on the server
sorry, how to checksum
Calculating a checksum is something common and widely used, not something specific to Stable Diffusion, please just Google it.
So? How to solve this problem?
for the ones who don't know how to checksum...
check the safetensor file in huggingface, for example:
https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/sd_xl_base_1.0_0.9vae.safetensors
just click into it, and you can notice the sha256.
in your terminal, check the downloaded file:
sha256sum sd_xl_base_1.0_0.9vae.safetensors
if they were not matched, please re-download the file.
please do not ask how to solve it more...
I tried the checksum but that wasn't the issue. When I load of Stable diffusion i first choose the model I want to create the embedding with and generate an image. Just any image. THEN try and create the embedding. Seemed to work for me.
I'm guessing its because the model isn't properly loaded and ready for the embedding if you don't?
P.s. it might also be because of a corrupted chckpoint so if you want just re-download the chckpoint to be safe