Open w-e-w opened 4 weeks ago
Yes I had this error thanks for fixing
Adding “Return” to the first line of modules/sd_models.py solves the problem.
Adding “Return” to the first line of modules/sd_models.py solves the problem.
??????
Adding “Return” to the first line of modules/sd_models.py solves the problem.
??????
After adding“Return”, you can select the model.
Adding “Return” to the first line of modules/sd_models.py solves the problem.
??????
After adding“Return”, you can select the model. When you can select the model, you can delete“Return”
you realize this is a pull request not an issue post
you realize this is a pull request not an issue post
Sorry, I'm working on problem #15595
Hi, I have this error AttributeError: 'NoneType' object has no attribute 'lowvram' How can I fix it? where I must writing the code? I know we change the code in cmd and webui-user.bat. Could you please explain what can i do?
Hi, I have this error AttributeError: 'NoneType' object has no attribute 'lowvram' How can I fix it? where I must writing the code? I know we change the code in cmd and webui-user.bat. Could you please explain what can i do?
I tried several times to reload and it fixed
@Zespina delete the corrupted model that's causing issue
@Zespina delete the corrupted model that's causing issue
No it is not corrupted model error
Happened to me as well and after trying several times fixed
There is certainly a bug
I also experienced the same issue. After deleting and re-downloading the new model several times, the error still persists upon startup. I noticed that in my configuration information, "sd_model_checkpoint" is set to null, which is likely the cause of the problem. However, I have not been able to find where to modify this configuration item.
@Zespina delete the corrupted model that's causing issue
No it is not corrupted model error
Happened to me as well and after trying several times fixed
There is certainly a bug
I noticed that in my configuration information, "sd_model_checkpoint" is set to null, which is likely the cause of the problem
I did some test just now by manually set sd_model_checkpoint
to null
and I wasn't able to replicate the issue
when the value is to null, webui will look for the first available model and loaded it
if no model can be found webui will download the default v1-5-pruned-emaonly.safetensors
from my testing as long as the model that webui tries to load can be loaded correctly (not corrupted) then it will able to function normally
After deleting and re-downloading the new model several times
even though attempting multiple times makes the likelihood of file corruption less likely, but it is still possible the only practical method to make sure if the model isn't corrupted is by compare the hash
you can calculate the hash of your downloaded file by using tools such as Powershell you can do so by using various tools such as powershell open powershell and then type ```ps1 Get-FileHash "C:\Path\to\the\modle.safetensors" ``` and press enter ```ps1 > Get-FileHash "v1-5-pruned-emaonly.safetensors" Algorithm Hash --------- ---- SHA256 6CE0161689B3853ACAA03779EC93EAFE75A02F4CED659BEE03F50797806FA2FA ``` after obtaining the hash of your file compare it to what is described by the source of the model for example the above hash is for `v1-5-pruned-emaonly.safetensors` you can see the hash will match the hash on hugging face https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.safetensors ![image](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/40751091/c9169ca6-8924-4db8-96b2-b3bd3cb86518) hash can also be found on civitai > AUTOV2 is just the fixst 10 characters of SHA256 ![image](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/40751091/eb4b0c64-230f-4f27-9235-eae2a304a581)
note there is also the possibility of that one downloaded a file that you think is a is a valid model but not for example you mistaken a LoRA as a SD model and put it in the dir for SD modes, webui will try and fail regardless if the model is corrupted or not
I noticed that in my configuration information, "sd_model_checkpoint" is set to null, which is likely the cause of the problem
I did some test just now by manually set
sd_model_checkpoint
tonull
and I wasn't able to replicate the issuewhen the value is to null, webui will look for the first available model and loaded it if no model can be found webui will download the default
v1-5-pruned-emaonly.safetensors
from my testing as long as the model that webui tries to load can be loaded correctly (not corrupted) then it will able to function normally
After deleting and re-downloading the new model several times
even though attempting multiple times makes the likelihood of file corruption less likely, but it is still possible the only practical method to make sure if the model isn't corrupted is by compare the hash
Thank you very much for your advice. Yesterday, I updated the new code you submitted, and today I turned on my computer and tried to run it again. I found that there were no errors reported. Although I restarted several times yesterday, it didn't work, which was quite strange. Nevertheless, thanks to your help, your method has solved my problem. I am very grateful.
Description
Fix corrupt model initial load loop
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/15568
fix initial corrupt model load loop
if for some reason the initial loading model at loading phase of webui is corrupted after entering this state the user will not be able to load even a good model is selected, due the the unload_model_weights > send_model_to_cpu > m.lowvram attribute check will fail becaules m is None webui will be stuck in the loop unable to recover without manual intervention
this issue can for the most part be simulated by setting the value
config.json > sd_model_checkpoint
path of a know corrupted modelTesting with theis PR I was able to change the model even the initial settings at load is pointing to a corrupted model, and after switching to a good model, image generation seem to work properly.
other possibly related issue
Checklist: