stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: WebUI crashes when changing model
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
when changing model after I generated image the trackback is:
Traceback (most recent call last):
File "E:\stableDiffiusion\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 284, in run_predict
output = await app.blocks.process_api(
File "E:\stableDiffiusion\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 982, in process_api
result = await self.call_function(fn_index, inputs, iterator)
File "E:\stableDiffiusion\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 824, in call_function
prediction = await anyio.to_thread.run_sync(
File "E:\stableDiffiusion\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "E:\stableDiffiusion\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "E:\stableDiffiusion\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run result = context.run(func, *args)
File "E:\stableDiffiusion\stable-diffusion-webui\modules\ui.py", line 1618, in <lambda>
fn=lambda value, k=k: run_settings_single(value, key=k),
File "E:\stableDiffiusion\stable-diffusion-webui\modules\ui.py", line 1459, in run_settings_single
if not opts.set(key, value):
File "E:\stableDiffiusion\stable-diffusion-webui\modules\shared.py", line 473, in set
self.data_labels[key].onchange()
File "E:\stableDiffiusion\stable-diffusion-webui\modules\call_queue.py", line 15, in f
res = func(*args, **kwargs)
File "E:\stableDiffiusion\stable-diffusion-webui\webui.py", line 63, in <lambda>
shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()))
File "E:\stableDiffiusion\stable-diffusion-webui\modules\sd_models.py", line 302, in reload_model_weights
load_model_weights(sd_model, checkpoint_info)
File "E:\stableDiffiusion\stable-diffusion-webui\modules\sd_models.py", line 191, in load_model_weights
sd = read_state_dict(checkpoint_file)
File "E:\stableDiffiusion\stable-diffusion-webui\modules\sd_models.py", line 173, in read_state_dict
sd = get_state_dict_from_checkpoint(pl_sd)
File "E:\stableDiffiusion\stable-diffusion-webui\modules\sd_models.py", line 147, in get_state_dict_from_checkpoint
pl_sd = pl_sd.pop("state_dict", pl_sd)
AttributeError: 'NoneType' object has no attribute 'pop'
Steps to reproduce the problem
- Lunch webui.bat
- generate image with any model
- change model to another one
- webui crashes
What should have happened?
it shouldn't crash
Commit where the problem happens
44c46f0ed395967cd3830dd481a2db759fda5b3b
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
No response
Additional information, context and logs
`
Traceback (most recent call last):
File "E:\stableDiffiusion\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 284, in run_predict
output = await app.blocks.process_api(
File "E:\stableDiffiusion\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 982, in process_api
result = await self.call_function(fn_index, inputs, iterator)
File "E:\stableDiffiusion\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 824, in call_function
prediction = await anyio.to_thread.run_sync(
File "E:\stableDiffiusion\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "E:\stableDiffiusion\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "E:\stableDiffiusion\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args)
File "E:\stableDiffiusion\stable-diffusion-webui\modules\ui.py", line 1618, in
`
may be this help
Have you tried adding --disable-safe-unpickle
? Your model weights are not loaded at all, possibly due to you using torch 1.13 which requires --disable-safe-unpickle
to load existing checkpoints.
solved?