stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Models can not be loaded and fails to open webui after update the project
Describe the bug After restarting the webui today, the program that was running normally did not start, and it seems to no file changes were made to the file during that time. There are 4 different ckpt models in models/Stable-diffusion/
To Reproduce
Just restarting the webui.
The value of variable model_checkpoint
is [None]
(a list, not hashable), then the error happened.
But I don't know why it turned out to be a list with a None values.
Screenshots
Traceback (most recent call last):
File "/mnt/0/projects/stable-diffusion-webui/launch.py", line 169, in <module>
start_webui()
File "/mnt/0/projects/stable-diffusion-webui/launch.py", line 164, in start_webui
webui.webui()
File "/mnt/0/projects/stable-diffusion-webui/webui.py", line 92, in webui
initialize()
File "/mnt/0/projects/stable-diffusion-webui/webui.py", line 86, in initialize
shared.sd_model = modules.sd_models.load_model()
File "/mnt/0/projects/stable-diffusion-webui/modules/sd_models.py", line 175, in load_model
checkpoint_info = select_checkpoint()
File "/mnt/0/projects/stable-diffusion-webui/modules/sd_models.py", line 103, in select_checkpoint
checkpoint_info = checkpoints_list.get(model_checkpoint, None)
TypeError: unhashable type: 'list'
Desktop (please complete the following information): unbuntu 20.04 Python 3.10.6
yes, I posted about this, temporary solution that worked for me. move all the models to a different folder and let it load with the standard model file. I was able to start it like this.
Launching Web UI with arguments: --medvram --xformers --deepdanbooru --no-half-vae usage: launch.py [-h] [--alpha ALPHA] [--output OUTPUT] [--overwrite] [--fullrange] [--method METHOD] model_0 model_1 launch.py: error: the following arguments are required: model_0, model_1 Press any key to continue . . .
my fix, in config.json change "sd_model_checkpoint" setting to a string. like "sd_model_checkpoint": "model.ckpt"
My fix :
- delete the config.json file
- move all the models unless one in a sub folder inside the "models" folder
- Start webui.bat
- the new web UI will be able to dig through the subfolder and show all the models
TLDR: I confirm the solution above works. Delete config.json, keep only the basic model, name it model.ckpt
I got a similar error message, and it was in colors with colored frames - something not usual in the command prompt window !!! It was beautiful though compared to the bland white text on black background that we are used to.
I tried going back to a previous commit that I knew to be working well and it did not fix the problem.
I tried just removing all the models but the basic 1.4 one and it was not enough to fix the problem. So I also removed the config.json file - and it fixed the problem.
One thing that might be important: the only model I kept (v1.4 basic model) was named model.ckpt
Anyways. Here is the end of the error message (The colors are gone)
│ C:\stable-diffusion-webui-master\modules\sd_models.py:109 in select_checkpoint │
│ │
│ 106 │
│ 107 def select_checkpoint(): │
│ 108 │ model_checkpoint = shared.opts.sd_model_checkpoint │
│ ❱ 109 │ checkpoint_info = checkpoints_list.get(model_checkpoint, None) │
│ 110 │ if checkpoint_info is not None: │
│ 111 │ │ return checkpoint_info │
│ 112 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: unhashable type: 'list'
Press any key to continue . . .
After an issue with changing the model from 2.1 512 back to 1.4 in the Web UI, restarting it I got the above mentioned error message. Then, keeping only the 1.4 model as model.ckpt and deleting the config.json file, the issue and error message went away. Thank you for providing the solution to this problem.