stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: ModuleNotFoundError: No module named 'scripts.hypertile_xyz'
Checklist
- [ ] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [ ] The issue exists in the current version of the webui
- [X] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet
What happened?
when I run webui-user.bat
on Win11, I got this error:
*** Error loading script: hypertile_script.py
Traceback (most recent call last):
File "D:\AI\OpenSource\stable-diffusion-webui\modules\scripts.py", line 469, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\OpenSource\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "D:\AI\OpenSource\stable-diffusion-webui\extensions-builtin\hypertile\scripts\hypertile_script.py", line 3, in <module>
from scripts.hypertile_xyz import add_axis_options
ModuleNotFoundError: No module named 'scripts.hypertile_xyz'
---
The WebUI launched successfully. But I want to know what could I do to avoid the error above.
Steps to reproduce the problem
.\webui-user.bat
What should have happened?
There should be no error like this.
What browsers do you use to access the UI ?
No response
Sysinfo
"Platform": "Windows-10-10.0.22631-SP0",
"Python": "3.11.2",
"Version": "v1.7.0",
"pip_version": "pip3",
"pip_packages": [
"numpy==1.23.5",
"open-clip-torch==2.20.0",
"pytorch-lightning==1.9.4",
"torch==2.0.1+cu118",
"torchdiffeq==0.2.3",
"torchmetrics==1.2.1",
"torchsde==0.2.6",
"torchvision==0.15.2+cu118"
],
"conda_packages": null,
"hip_compiled_version": "N/A",
"hip_runtime_version": "N/A",
"miopen_runtime_version": "N/A",
"caching_allocator_config": "",
"is_xnnpack_available": "True",
Console logs
(venv) PS D:\AI\OpenSource\stable-diffusion-webui> .\webui-user.bat
venv "D:\AI\OpenSource\stable-diffusion-webui\venv\Scripts\Python.exe"
==============================================================================================================
INCOMPATIBLE PYTHON VERSION
This program is tested with 3.10.6 Python, but you have 3.11.2.
If you encounter an error with "RuntimeError: Couldn't install torch." message,
or any other error regarding unsuccessful package (library) installation,
please downgrade (or upgrade) to the latest version of 3.10 Python
and delete current Python and "venv" folder in WebUI's directory.
You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3106/
Alternatively, use a binary release of WebUI: https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases
Use --skip-python-version-check to suppress this warning.
==============================================================================================================
Python 3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)]
Version: v1.7.0
Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e
Launching Web UI with arguments:
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Style database not found: D:\AI\OpenSource\stable-diffusion-webui\styles.csv
*** Error loading script: hypertile_script.py
Traceback (most recent call last):
File "D:\AI\OpenSource\stable-diffusion-webui\modules\scripts.py", line 469, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\OpenSource\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "D:\AI\OpenSource\stable-diffusion-webui\extensions-builtin\hypertile\scripts\hypertile_script.py", line 3, in <module>
from scripts.hypertile_xyz import add_axis_options
ModuleNotFoundError: No module named 'scripts.hypertile_xyz'
---
Loading weights [dfe73aa42d] from D:\AI\OpenSource\stable-diffusion-webui\models\Stable-diffusion\leosamsHelloworldSDXL_helloworldSDXL32DPO.safetensors
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Creating model from config: D:\AI\OpenSource\stable-diffusion-webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
Startup time: 11.9s (prepare environment: 2.8s, import torch: 2.8s, import gradio: 1.3s, setup paths: 1.0s, initialize shared: 0.4s, other imports: 0.9s, setup codeformer: 0.1s, load scripts: 0.9s, create ui: 0.4s, gradio launch: 1.2s).
Applying attention optimization: Doggettx... done.
Model loaded in 11.1s (load weights from disk: 1.1s, create model: 0.5s, apply weights to model: 8.7s, move model to device: 0.2s, calculate empty prompt: 0.3s).
Additional information
No response
Combine the content of hypertile_xyz.py
and hypertile_script.py
may fix it.
Comment this line # from scripts.hypertile_xyz import add_axis_options
in hypertile_script.py
.
The problem is caused by the program try to load hypertile_xyz.py from stable-diffusion-webui/scripts
but this file is in extensions-builtin. The dirname is the same scripts
.
Can I just ignore it with doing nothing?
Combine the content of
hypertile_xyz.py
andhypertile_script.py
may fix it. Comment this line# from scripts.hypertile_xyz import add_axis_options
inhypertile_script.py
. The problem is caused by the program try to load hypertile_xyz.py fromstable-diffusion-webui/scripts
but this file is in extensions-builtin. The dirname is the samescripts
.
I had those settings in my ~/.bashrc
:
export PYTHONPATH=$PYTHONPATH:/home/me/dev/generative-models
export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH
I removed them and the error went away. So probably the PYTHONPATH
has some issue 🤷♂️
For me it's a PYTHONPATH
issue caused by bad behaved packages. The culprit is lm-eval
package which installs a scripts
directory to the /path/to/python/site-packages
. It prevent any further search for scripts
module. Uninstalling the problematic package solves the issue.
Disable the last extension you installed