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: module 'modules.shared' has no attribute 'loaded_hypernetwork'. Did you mean: 'loaded_hypernetworks'? #38

Closed
JasonHoku opened this issue Jan 22, 2023 · 3 comments

Comments

@JasonHoku
Copy link

Hello, today I ran a git pull on the stable webui and afterwards it would not start and outputted the following error:

Model loaded in 4.1s (0.4s create model, 2.2s load weights).
None
Traceback (most recent call last):
  File "D:\AUTOMATIC1111stable-diffusion-webui\stable-diffusion-webui\launch.py", line 317, in <module>
    start()
  File "D:\AUTOMATIC1111stable-diffusion-webui\stable-diffusion-webui\launch.py", line 312, in start
    webui.webui()
  File "D:\AUTOMATIC1111stable-diffusion-webui\stable-diffusion-webui\webui.py", line 162, in webui
    initialize()
  File "D:\AUTOMATIC1111stable-diffusion-webui\stable-diffusion-webui\webui.py", line 91, in initialize
    shared.reload_hypernetworks()
  File "D:\AUTOMATIC1111stable-diffusion-webui\stable-diffusion-webui\extensions\Hypernetwork-MonkeyPatch-Extension\patches\shared.py", line 9, in reload_hypernetworks
    load_hypernetwork(opts.sd_hypernetwork)
  File "D:\AUTOMATIC1111stable-diffusion-webui\stable-diffusion-webui\extensions\Hypernetwork-MonkeyPatch-Extension\patches\hypernetwork.py", line 479, in load_hypernetwork
    if shared.loaded_hypernetwork is not None:
AttributeError: module 'modules.shared' has no attribute 'loaded_hypernetwork'. Did you mean: 'loaded_hypernetworks'?
Press any key to continue . . . 

However, I did remedy this by running the following in the extensions directory:
git config --global --add safe.directory D:/AUTOMATIC1111stable-diffusion-webui/stable-diffusion-webui/extensions/Hypernetwork-MonkeyPatch-Extension
and then git pull

@aria1th
Copy link
Owner

aria1th commented Jan 23, 2023

You need to update extension by running git pull in extension directory , or update it in extension tab.

@JasonHoku
Copy link
Author

Yes, I had to run both the lines I previously mentioned to accomplish that.

I figured I'd post the error here in case anyone else ran into it. And thanks for the quick work and awesome extension ^_^

@aria1th aria1th pinned this issue Jan 24, 2023
@aria1th
Copy link
Owner

aria1th commented Jan 24, 2023

Closing the issue, but pinned for future users.

@aria1th aria1th closed this as completed Jan 24, 2023
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

2 participants