Open zicheqingluo opened 1 year ago
look at this. You need clone https://github.com/Stability-AI/generative-models.git
at repositories/generative-models
Also happening to me.
How to solve this problem?
to fix it you need to clone it to the repositories folder
To fix sgm only the one below is needed. git clone https://github.com/Stability-AI/generative-models.git
In my case the k-diffusion was also missing so there you go git clone https://github.com/crowsonkb/k-diffusion.git
Ok here's what worked for me. In my case, it was an indication of the bigger file structure conflict. If you can't solve it with cloning the rep, chances are you're experiencing something similar. After I cloned the rep and even manually imported sgm with importlib.util, I got module 'gradio' has no attribute 'themes'.
The solution: delete your 'SD' directory in the gdrive entirely and re-run the script from the start to reload it.
Mind you, this will likely work only if your script worked before but doesn't anymore. If you never successfully ran it to begin with or used other scripts which referenced SD directory, your problem is probably elsewhere.
PS. For reference, SGM is literally this: https://github.com/Stability-AI/generative-models/tree/main/sgm
git clone https://github.com/Stability-AI/generative-models.git repositories/generative-models
cd repositories/generative-models
pip install -e .
it works for me
Is there an existing issue for this?
What happened?
Warning: Stable Diffusion XL not found at path /data/rd/aigc/stable-diffusion/stable-diffusion-webui/repositories/generative-models/sgm Traceback (most recent call last): File "/data/rd/aigc/stable-diffusion/stable-diffusion-webui/webui.py", line 13, in
initialize.imports()
File "/data/rd/aigc/stable-diffusion/stable-diffusion-webui/modules/initialize.py", line 30, in imports
import sgm.modules.encoders.modules # noqa: F401
ModuleNotFoundError: No module named 'sgm'
Steps to reproduce the problem
python webui.py
What should have happened?
What is “sgm”
Sysinfo
Warning: Stable Diffusion XL not found at path /data/rd/aigc/stable-diffusion/stable-diffusion-webui/repositories/generative-models/sgm Traceback (most recent call last): File "/data/rd/aigc/stable-diffusion/stable-diffusion-webui/webui.py", line 13, in
initialize.imports()
File "/data/rd/aigc/stable-diffusion/stable-diffusion-webui/modules/initialize.py", line 30, in imports
import sgm.modules.encoders.modules # noqa: F401
ModuleNotFoundError: No module named 'sgm'
What browsers do you use to access the UI ?
No response
Console logs
Additional information
No response