Disappeared tab
Closed this issue · 14 comments
after restarting after adding the tokens I get this error:
*** Error loading script: sd_webui_xldemo_txt2img.py
Traceback (most recent call last):
File "C:\Users\EF\Documents\stable-diffusion-webui-master\modules\scripts.py", line 274, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\Users\EF\Documents\stable-diffusion-webui-master\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Users\EF\Documents\stable-diffusion-webui-master\extensions\sd-webui-xldemo-txt2img\scripts\sd_webui_xldemo_txt2img.py", line 3, in
from xldemo_txt2img_ui import make_ui
File "C:\Users\EF\Documents\stable-diffusion-webui-master\extensions\sd-webui-xldemo-txt2img\xldemo_txt2img_ui.py", line 6, in
from xldemo_txt2img import XLDEMO_HUGGINGFACE_ACCESS_TOKEN, XLDEMO_LOAD_REFINER_ON_STARTUP
File "C:\Users\EF\Documents\stable-diffusion-webui-master\extensions\sd-webui-xldemo-txt2img\xldemo_txt2img.py", line 144, in
xldemo_txt2img = XLDemo()
File "C:\Users\EF\Documents\stable-diffusion-webui-master\extensions\sd-webui-xldemo-txt2img\xldemo_txt2img.py", line 56, in init
self.pipe = DiffusionPipeline.from_pretrained(
File "C:\Users\EF\Documents\stable-diffusion-webui-master\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 884, in from_pretrained
cached_folder = cls.download(
File "C:\Users\EF\Documents\stable-diffusion-webui-master\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 1265, in download
pipeline_class = _get_pipeline_class(
File "C:\Users\EF\Documents\stable-diffusion-webui-master\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 344, in _get_pipeline_class
return getattr(diffusers_module, config["_class_name"])
AttributeError: module 'diffusers' has no attribute 'StableDiffusionXLPipeline'
Same here ;-(
Me too
[Windows Users]
This is my testing environment of my Windows 10 machine
Nvidia driver version 536.40
GPU: RTX3060 12G VRAM
If you want to try
-
Please remove the
models--stabilityai--stable-diffusion-xl-base-0.9 and
models--stabilityai--stable-diffusion-xl-refiner-0.9 folders
under the path
C:\Users\username.cache\huggingface\hub
But this should have no weights inside -
Update the extension from the Web UI
-
Restart Web UI
-
The weights should automatically downloaded to the path
C:\Users\username.cache\huggingface\hub -
If everything's okay, you can play with it
Thanks for the reply @lifeisboringsoprogramming
I search for :
models--stabilityai--stable-diffusion-xl-base-0.9
And deleted it however I cant find "models--stabilityai--stable-diffusion-xl-refiner-0.9"
I removed the extention and installed it again however I am still getting "models--stabilityai--stable-diffusion-xl-base-0.9" folder created and same error:
Loading model stabilityai/stable-diffusion-xl-base-0.9
Downloading (…)ain/model_index.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 582/582 [00:00<?, ?B/s]
*** Error loading script: sd_webui_xldemo_txt2img.py
Traceback (most recent call last):
File "E:\stable-diffusion-webui\modules\scripts.py", line 274, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "E:\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "E:\stable-diffusion-webui\extensions\sd-webui-xldemo-txt2img\scripts\sd_webui_xldemo_txt2img.py", line 3, in <module>
from xldemo_txt2img_ui import make_ui
File "E:\stable-diffusion-webui\extensions\sd-webui-xldemo-txt2img\xldemo_txt2img_ui.py", line 6, in <module>
from xldemo_txt2img import XLDEMO_HUGGINGFACE_ACCESS_TOKEN, XLDEMO_LOAD_REFINER_ON_STARTUP
File "E:\stable-diffusion-webui\extensions\sd-webui-xldemo-txt2img\xldemo_txt2img.py", line 144, in <module>
xldemo_txt2img = XLDemo()
File "E:\stable-diffusion-webui\extensions\sd-webui-xldemo-txt2img\xldemo_txt2img.py", line 56, in __init__
self.pipe = DiffusionPipeline.from_pretrained(
File "E:\stable-diffusion-webui\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 884, in from_pretrained
cached_folder = cls.download(
File "E:\stable-diffusion-webui\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 1265, in download
pipeline_class = _get_pipeline_class(
File "E:\stable-diffusion-webui\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 344, in _get_pipeline_class
return getattr(diffusers_module, config["_class_name"])
AttributeError: module 'diffusers' has no attribute 'StableDiffusionXLPipeline'
I try on another computer and it did work from 1st install so it seems on my main PC there is something stuck somewhere beside "models--stabilityai--stable-diffusion-xl-base-0.9"
I just fixed the diffusers==0.18.1 version in requirement.txt
It was using git+https://github.com/huggingface/diffusers.git so you may install the lastest codes which I did not test
Please try to update the extension and restart the web UI, thanks
Thanks for the speedy response, I am sorry to say it did not work and I got an error again ;-(
Loading model stabilityai/stable-diffusion-xl-base-0.9
Downloading (…)ain/model_index.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 582/582 [00:00<?, ?B/s]
*** Error loading script: sd_webui_xldemo_txt2img.py
Traceback (most recent call last):
File "E:\stable-diffusion-webui\modules\scripts.py", line 274, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "E:\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "E:\stable-diffusion-webui\extensions\sd-webui-xldemo-txt2img\scripts\sd_webui_xldemo_txt2img.py", line 3, in <module>
from xldemo_txt2img_ui import make_ui
File "E:\stable-diffusion-webui\extensions\sd-webui-xldemo-txt2img\xldemo_txt2img_ui.py", line 6, in <module>
from xldemo_txt2img import XLDEMO_HUGGINGFACE_ACCESS_TOKEN, XLDEMO_LOAD_REFINER_ON_STARTUP
File "E:\stable-diffusion-webui\extensions\sd-webui-xldemo-txt2img\xldemo_txt2img.py", line 144, in <module>
xldemo_txt2img = XLDemo()
File "E:\stable-diffusion-webui\extensions\sd-webui-xldemo-txt2img\xldemo_txt2img.py", line 56, in __init__
self.pipe = DiffusionPipeline.from_pretrained(
File "E:\stable-diffusion-webui\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 884, in from_pretrained
cached_folder = cls.download(
File "E:\stable-diffusion-webui\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 1265, in download
pipeline_class = _get_pipeline_class(
File "E:\stable-diffusion-webui\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 344, in _get_pipeline_class
return getattr(diffusers_module, config["_class_name"])
AttributeError: module 'diffusers' has no attribute 'StableDiffusionXLPipeline'
I am guessing
do you have any other extension that installed another version of diffusers?
How can I uninstall it and re-install the correct one in venv ?
My main PC is identical to the laptop as metioned before however the only diffrance I iinstall it on laptop and it work after your quick fix however on desktop I installed it before the quick fix.
Open the cmd prompt (Win key, then search cmd)
-
cd C:\stable-diffusion-webui
-
.\venv\Scripts\activate.bat
-
pip install diffusers==0.18.1
I hope this helps
Tested it and below the result:
pip install diffusers==0.18.1
WARNING: Ignoring invalid distribution -rotobuf (e:\ai__project\stable-diffusion-webui\venv\lib\site-packages)
Collecting diffusers==0.18.1
Using cached diffusers-0.18.1-py3-none-any.whl
Requirement already satisfied: importlib-metadata in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from diffusers==0.18.1) (6.7.0)
Requirement already satisfied: filelock in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from diffusers==0.18.1) (3.12.2)
Requirement already satisfied: huggingface-hub>=0.13.2 in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from diffusers==0.18.1) (0.15.1)
Requirement already satisfied: numpy in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from diffusers==0.18.1) (1.23.5)
Requirement already satisfied: regex!=2019.12.17 in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from diffusers==0.18.1) (2023.6.3)
Requirement already satisfied: requests in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from diffusers==0.18.1) (2.31.0)
Requirement already satisfied: Pillow in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from diffusers==0.18.1) (9.5.0)
Requirement already satisfied: fsspec in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from huggingface-hub>=0.13.2->diffusers==0.18.1) (2023.6.0)
Requirement already satisfied: tqdm>=4.42.1 in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from huggingface-hub>=0.13.2->diffusers==0.18.1) (4.65.0)
Requirement already satisfied: pyyaml>=5.1 in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from huggingface-hub>=0.13.2->diffusers==0.18.1) (6.0)
Requirement already satisfied: typing-extensions>=3.7.4.3 in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from huggingface-hub>=0.13.2->diffusers==0.18.1) (4.6.3)
Requirement already satisfied: packaging>=20.9 in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from huggingface-hub>=0.13.2->diffusers==0.18.1) (23.1)
Requirement already satisfied: zipp>=0.5 in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from importlib-metadata->diffusers==0.18.1) (3.15.0)
Requirement already satisfied: charset-normalizer<4,>=2 in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from requests->diffusers==0.18.1) (3.1.0)
Requirement already satisfied: idna<4,>=2.5 in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from requests->diffusers==0.18.1) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from requests->diffusers==0.18.1) (1.26.16)
Requirement already satisfied: certifi>=2017.4.17 in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from requests->diffusers==0.18.1) (2023.5.7)
Requirement already satisfied: colorama in e:\ai__project\stable-diffusion-webui\venv\lib\site-packages (from tqdm>=4.42.1->huggingface-hub>=0.13.2->diffusers==0.18.1) (0.4.6)
WARNING: Ignoring invalid distribution -rotobuf (e:\ai__project\stable-diffusion-webui\venv\lib\site-packages)
Installing collected packages: diffusers
Attempting uninstall: diffusers
Found existing installation: diffusers 0.16.1
Uninstalling diffusers-0.16.1:
Successfully uninstalled diffusers-0.16.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
lama-cleaner 1.2.1 requires diffusers==0.16.1, but you have diffusers 0.18.1 which is incompatible.
lama-cleaner 1.2.1 requires transformers==4.27.4, but you have transformers 4.30.2 which is incompatible.
Successfully installed diffusers-0.18.1
Running SD still give the same error ;-(
I will test later today to remove venv and let it create new one and see what will happen.
I think the lama-cleaner extension conflicts the package, you can try remove that extension
I dont have lama-cleaner extension however I did removed venv and rebult it again and now I am stuck on this:
Loading model stabilityai/stable-diffusion-xl-base-0.9
*** Error loading script: sd_webui_xldemo_txt2img.py
Traceback (most recent call last):
File "E:\stable-diffusion-webui\modules\scripts.py", line 274, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "E:\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "E:\stable-diffusion-webui\extensions\sd-webui-xldemo-txt2img\scripts\sd_webui_xldemo_txt2img.py", line 3, in <module>
from xldemo_txt2img_ui import make_ui
File "E:\stable-diffusion-webui\extensions\sd-webui-xldemo-txt2img\xldemo_txt2img_ui.py", line 6, in <module>
from xldemo_txt2img import XLDEMO_HUGGINGFACE_ACCESS_TOKEN, XLDEMO_LOAD_REFINER_ON_STARTUP
File "E:\stable-diffusion-webui\extensions\sd-webui-xldemo-txt2img\xldemo_txt2img.py", line 177, in <module>
xldemo_txt2img = XLDemo()
File "E:\stable-diffusion-webui\extensions\sd-webui-xldemo-txt2img\xldemo_txt2img.py", line 72, in __init__
self.pipe = DiffusionPipeline.from_pretrained(
File "E:\stable-diffusion-webui\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 884, in from_pretrained
cached_folder = cls.download(
File "E:\Ai__Project\stable-diffusion-webui\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 1265, in download
pipeline_class = _get_pipeline_class(
File "E:\stable-diffusion-webui\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 344, in _get_pipeline_class
return getattr(diffusers_module, config["_class_name"])
AttributeError: module 'diffusers' has no attribute 'StableDiffusionXLPipeline'
---
what about with installing just one extension sd-webui-xldemo-txt2img?
Sorry for the late reply, yes it work on it own.
I have no idea why it is conflecting on the desktop PC while it is working with same extentions installed on my laptop