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' #24

Open
Baumkuch3n opened this issue Dec 24, 2022 · 9 comments
Open

AttributeError: 'NoneType' #24

Baumkuch3n opened this issue Dec 24, 2022 · 9 comments

Comments

@Baumkuch3n
Copy link

I was having a lot of trouble with getting this started as im pretty new with handling Python and this stuff in general.
Im now running into this error when starting the webui-user.bat (Windows) and cant seem to find a solution:

loaded_state_dict_keys = [k for k in state_dict.keys()]
AttributeError: 'NoneType' object has no attribute 'keys'

Also, do I need everything you put in that "requirements" document?
If so it seems you left a hell lot of stuff out of your described installation process.
And as a newbe I have no plan on how to install all that stuff.

@Delcos
Copy link
Owner

Delcos commented Dec 24, 2022

Do download anaconda for windows, this should install needed libraries too.run the bat again and it should start.

If you start webui-user.bat again after installing and it still gives errors open the start menu and type in anaconda and click on it, not PowerShell but normal anaconda, right click and open as admin. The use CD to get to the stable diffusion folder. As in CD Desktop and then type dir, then the next folder name, etc, until you're in the stable diffusion folder. Then type in "pip install -r requirements.txt" without the ".

@Baumkuch3n
Copy link
Author

Ok I got anaconda but it sadly still gave me the same error.
I opened "Anaconda Promt (Anaconda3)" and typed in:
"pip install -r D:\stable-diffusion-webui-master\requirements.txt"
First the installation went well but then it said that some file is relying on "daal==2021.4.0" which was not installed.
So I put that in the requirements.txt as well, which worked.
It then gave me another error tho:
"Installing collected packages: tbb, daal
Attempting uninstall: tbb
Found existing installation: TBB 0.2
ERROR: Cannot uninstall 'TBB'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall."
I havent found a way around this yet.
"pip install --ignore-installed [package name]==[package version]" does not work.
Any idea?

@Delcos
Copy link
Owner

Delcos commented Dec 25, 2022

On windows to make changes you need to run anaconda as an admin, so right click and choose run as an admin.

@donaldanixon
Copy link

Are you using hd-18 or hd-17 @Baumkuch3n? I've also encountered errors when trying to load HD-18 saying theres nothing in the state_dict yet the same script loads hd-17 fine...

@donaldanixon
Copy link

Same as #30 and #32

@Kuroseji
Copy link

Kuroseji commented Jan 3, 2023

I've been looking into the state_dict issues and it seems to be common when trying to use Stable Diffusion 2.0+ based models. I was able to open the HD-17 and HD-18 files in a text editor and noticed that line 2 of HD-17 has the text "state_dict" while HD-18 does not. From what I understand there were some format changes with SD2.0 models and right now my webui(sygil-webui) doesn't support 2.0+. This might explain your issue if you have having the "KeyError: 'state_dict'" issue like I am having.
Sadly not a fix but as far as I can tell it's an issue with the UI's not the model itself.

@Delcos
Copy link
Owner

Delcos commented Jan 3, 2023

I didn't use 2.0 but a few people have reported this and I think it's an issue with the fire upload itself. I'll be redoing the link today.

@donaldanixon
Copy link

@Kuroseji - you were correct about the assertion it was with the UI. The sygil-dev webui had the same issue, and has since been updated to fix the issue (was just a case of telling the model loader to load the whole model if there wasn't just a state_dict)

@Kuroseji
Copy link

Kuroseji commented Jan 8, 2023

Oh cool, I had actually switched to automatic since it thought it was a SD2.0 related issue.

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

4 participants