AlUlkesh / stable-diffusion-webui-images-browser

an images browse for stable-diffusion-webui
629 stars 111 forks source link

Every time I start, it report an error. #214

Closed Sostay closed 1 year ago

Sostay commented 1 year ago

After turning off this extension, there is no problem in starting it. how should i fix it ?

*** Error running install.py for extension E:\SD-webui\extensions\stable-diffusion-webui-images-browser.
*** Command: "E:\SD-webui\py310\python.exe" "E:\SD-webui\extensions\stable-diffusion-webui-images-browser\install.py"
*** Error code: 1
*** stdout: Installing ImageReward requirement for image browser
*** 
*** stderr: Traceback (most recent call last):
***   File "E:\SD-webui\extensions\stable-diffusion-webui-images-browser\install.py", line 9, in <module>
***     launch.run_pip(f'install -r "{req_IR}" --no-deps image-reward', 'ImageReward requirement for image browser')
***   File "E:\SD-webui\modules\launch_utils.py", line 130, in run_pip
***     return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
***   File "E:\SD-webui\modules\launch_utils.py", line 107, in run
***     raise RuntimeError("\n".join(error_bits))
*** RuntimeError: Couldn't install ImageReward requirement for image browser.
*** Command: "E:\SD-webui\py310\python.exe" -m pip install -r "E:\SD-webui\extensions\stable-diffusion-webui-images-browser\req_IR.txt" --no-deps image-reward --prefer-binary --index-url https://mirror.baidu.com/pypi/simple
*** Error code: 2
*** stdout: Looking in indexes: https://mirror.baidu.com/pypi/simple, https://mirrors.aliyun.com/pypi/simple
*** Looking in links: https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html
*** Collecting image-reward
***   Using cached https://mirrors.aliyun.com/pypi/packages/0a/38/ac245d9ec4c216e38e36b02ee352fa55b489466e2497088d960f8dc9b4f3/image_reward-1.4-py3-none-any.whl (42 kB)
*** Collecting fairscale
***   Using cached https://mirrors.aliyun.com/pypi/packages/c1/08/b3334d7b543ac10dcb129cef4f84723ab696725512f18d69ab3a784b0bf5/fairscale-0.4.13.tar.gz (266 kB)
***   Installing build dependencies: started
***   Installing build dependencies: finished with status 'done'
***   Getting requirements to build wheel: started
***   Getting requirements to build wheel: finished with status 'done'
*** 
*** stderr: ERROR: Exception:
*** Traceback (most recent call last):
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\cli\base_command.py", line 160, in exc_logging_wrapper
***     status = run_func(*args)
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\cli\req_command.py", line 247, in wrapper
***     return func(self, options, args)
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\commands\install.py", line 419, in run
***     requirement_set = resolver.resolve(
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 92, in resolve
***     result = self._result = resolver.resolve(
***   File "E:\SD-webui\py310\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 481, in resolve
***     state = resolution.resolve(requirements, max_rounds=max_rounds)
***   File "E:\SD-webui\py310\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 348, in resolve
***     self._add_to_criteria(self.state.criteria, r, parent=None)
***   File "E:\SD-webui\py310\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 172, in _add_to_criteria
***     if not criterion.candidates:
***   File "E:\SD-webui\py310\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 151, in __bool__
***     return bool(self._sequence)
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 155, in __bool__
***     return any(self)
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
***     return (c for c in iterator if id(c) not in self._incompatible_ids)
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
***     candidate = func()
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 206, in _make_candidate_from_link
***     self._link_candidate_cache[link] = LinkCandidate(
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 297, in __init__
***     super().__init__(
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 162, in __init__
***     self.dist = self._prepare()
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 231, in _prepare
***     dist = self._prepare_distribution()
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 308, in _prepare_distribution
***     return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\operations\prepare.py", line 491, in prepare_linked_requirement
***     return self._prepare_linked_requirement(req, parallel_builds)
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\operations\prepare.py", line 577, in _prepare_linked_requirement
***     dist = _get_prepared_distribution(
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\operations\prepare.py", line 69, in _get_prepared_distribution
***     abstract_dist.prepare_distribution_metadata(
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\distributions\sdist.py", line 48, in prepare_distribution_metadata
***     self._install_build_reqs(finder)
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\distributions\sdist.py", line 118, in _install_build_reqs
***     build_reqs = self._get_build_requires_wheel()
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\distributions\sdist.py", line 95, in _get_build_requires_wheel
***     return backend.get_requires_for_build_wheel()
***   File "E:\SD-webui\py310\lib\site-packages\pip\_internal\utils\misc.py", line 701, in get_requires_for_build_wheel
***     return super().get_requires_for_build_wheel(config_settings=cs)
***   File "E:\SD-webui\py310\lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 166, in get_requires_for_build_wheel
***     return self._call_hook('get_requires_for_build_wheel', {
***   File "E:\SD-webui\py310\lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 321, in _call_hook
***     raise BackendUnavailable(data.get('traceback', ''))
*** pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
***   File "E:\SD-webui\py310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend
***     obj = import_module(mod_path)
***   File "importlib\__init__.py", line 126, in import_module
***   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
***   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
***   File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
***   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
***   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
***   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
***   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
***   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
***   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
***   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
***   File "C:\Users\admin\AppData\Local\Temp\pip-build-env-20jrmimn\overlay\Lib\site-packages\setuptools\__init__.py", line 15, in <module>
***     import setuptools.version
***   File "C:\Users\admin\AppData\Local\Temp\pip-build-env-20jrmimn\overlay\Lib\site-packages\setuptools\version.py", line 1, in <module>
***     from ._importlib import metadata
***   File "C:\Users\admin\AppData\Local\Temp\pip-build-env-20jrmimn\overlay\Lib\site-packages\setuptools\_importlib.py", line 44, in <module>
***     import importlib.metadata as metadata  # noqa: F401
***   File "importlib\metadata\__init__.py", line 17, in <module>
***   File "importlib\metadata\_adapters.py", line 3, in <module>
***   File "email\message.py", line 15, in <module>
***   File "email\utils.py", line 29, in <module>
***   File "socket.py", line 51, in <module>
*** ModuleNotFoundError: No module named '_socket'
*** 
*** 
AlUlkesh commented 1 year ago

Does the same thing happen, when you try to install it manually?

From the a1111 directory:

venv\Scripts\activate.bat
pip install -r extensions\stable-diffusion-webui-images-browser\req_IR.txt --no-deps image-reward
Sostay commented 1 year ago

Does the same thing happen, when you try to install it manually?

From the a1111 directory:

venv\Scripts\activate.bat
pip install -r extensions\stable-diffusion-webui-images-browser\req_IR.txt --no-deps image-reward

i have no 'venv' folder in my sd webui directory 😂

AlUlkesh commented 1 year ago

i have no 'venv' folder in my sd webui directory 😂

Oookay... How did you install a1111?

Sostay commented 1 year ago

i have no 'venv' folder in my sd webui directory 😂

Oookay... How did you install a1111?

Im using a popular integration package(based on the a1111) made by some people, and there has never been a folder named venv. 😂 But all the functions are in normal use.

AlUlkesh commented 1 year ago

Judging from the log your venv directory might be called E:\SD-webui\py310

Check if there's an activate.bat in there.

If not what does it say here in your webui-user.bat:

set PYTHON=
set VENV_DIR=

?

Sostay commented 1 year ago

Judging from the log your venv directory might be called E:\SD-webui\py310

Check if there's an activate.bat in there.

If not what does it say here in your webui-user.bat:

set PYTHON=
set VENV_DIR=

?

no activate.bat file.

if not defined PYTHON (set PYTHON=python)
if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv")
……
……
:activate_venv
set PYTHON="%VENV_DIR%\Scripts\Python.exe"
echo venv %PYTHON%
AlUlkesh commented 1 year ago

That's webui.bat. How does your webui-user.bat look like?

Sostay commented 1 year ago

That's webui.bat. How does your webui-user.bat look like?

@echo off

set PYTHON= set GIT= set VENV_DIR= set COMMANDLINE_ARGS=

call webui.bat

AlUlkesh commented 1 year ago

And webui-user.bat is also how you start it?

WizardofAZ9 commented 1 year ago

I'm having the same problem even after trying to install it manually. Oddly enough, it still seems to work despite all the errors.

Sostay commented 1 year ago

I'm having the same problem even after trying to install it manually. Oddly enough, it still seems to work despite all the errors.即使尝试手动安装后我也遇到同样的问题。奇怪的是,尽管出现了所有错误,它似乎仍然有效。

This problem is so difficult that I have started to use other picture browsers.😂.😂.😂

AlUlkesh commented 1 year ago

I can't replicate this at all. The following information would be helpful:

WizardofAZ9 commented 1 year ago

Windows 11 Pro, Chrome version: v1.4.1  •  python: 3.10.6  •  torch: 2.0.1+cu118  •  xformers: 0.0.20  •  gradio: 3.32.0  •  checkpoint: 54d8a62d61 I installed it using these instructions from the Git:

Installation on Windows 10/11 with NVidia-GPUs using release package Download sd.webui.zip from v1.0.0-pre and extract it's contents. Run update.bat. Run run.bat.

I start it by running run.bat which looks like this: @echo off

call environment.bat

cd %~dp0webui call webui-user.bat

Yes I have venv and activate and I tried installing it that way and it didn't give me an errors but when I launch web-ui I get the errors the previous user described above. My webui-user.bat looks like:

@echo off

set PYTHON= set GIT= set VENV_DIR= set COMMANDLINE_ARGS=--xformers

call webui.bat

AlUlkesh commented 1 year ago

@WizardofAZ9 Thanks for the detailed description. That helped a lot.

I've made a few changes to the install process. Please let me know, if this works for you.

WizardofAZ9 commented 1 year ago

I deleted the stable-diffusion-webui-images-browser folder and recloned the git, but I'm getting a nearly identical error as far as I can tell. There are some differences though, brought on by your changes I assume. I'm considering a fresh install to see if that fixes the issue, but I don't recall seeing this error when I first started using this extension, it happened when I updated my extensions from within SD webui a few days ago.

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: v1.4.1 Commit hash: f865d3e11647dfd6c7b2cdf90dde24680e58acd8 Installing requirements

Error running install.py for extension H:\Downloads\sd.webui\webui\extensions\stable-diffusion-webui-images-browser. Command: "H:\Downloads\sd.webui\system\python\python.exe" "H:\Downloads\sd.webui\webui\extensions\stable-diffusion-webui-images-browser\install.py" Error code: 1 stdout: Installing ImageReward requirement for image browser


stderr: Traceback (most recent call last): File "H:\Downloads\sd.webui\webui\extensions\stable-diffusion-webui-images-browser\install.py", line 8, in import ImageReward ModuleNotFoundError: No module named 'ImageReward'


*** During handling of the above exception, another exception occurred:


Traceback (most recent call last): File "H:\Downloads\sd.webui\webui\extensions\stable-diffusion-webui-images-browser\install.py", line 17, in launch.run_pip(f'install -r "{req_IR}" --no-deps image-reward', 'ImageReward requirement for image browser') File "H:\Downloads\sd.webui\webui\modules\launch_utils.py", line 130, in run_pip return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live) File "H:\Downloads\sd.webui\webui\modules\launch_utils.py", line 107, in run raise RuntimeError("\n".join(error_bits)) RuntimeError: Couldn't install ImageReward requirement for image browser. Command: "H:\Downloads\sd.webui\system\python\python.exe" -m pip install -r "H:\Downloads\sd.webui\webui\extensions\stable-diffusion-webui-images-browser\req_IR.txt" --no-deps image-reward --prefer-binary Error code: 2 stdout: Collecting image-reward Using cached image_reward-1.5-py3-none-any.whl (42 kB) Collecting datasets (from -r H:\Downloads\sd.webui\webui\extensions\stable-diffusion-webui-images-browser\req_IR.txt (line 1)) Using cached datasets-2.13.1-py3-none-any.whl (486 kB) Collecting diffusers (from -r H:\Downloads\sd.webui\webui\extensions\stable-diffusion-webui-images-browser\req_IR.txt (line 2)) Using cached diffusers-0.18.2-py3-none-any.whl (1.2 MB) Collecting dill (from -r H:\Downloads\sd.webui\webui\extensions\stable-diffusion-webui-images-browser\req_IR.txt (line 3)) Using cached dill-0.3.6-py3-none-any.whl (110 kB) Collecting fairscale (from -r H:\Downloads\sd.webui\webui\extensions\stable-diffusion-webui-images-browser\req_IR.txt (line 4)) Using cached fairscale-0.4.13.tar.gz (266 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done'


stderr: ERROR: Exception: Traceback (most recent call last): File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\cli\base_command.py", line 169, in exc_logging_wrapper status = run_func(*args) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\cli\req_command.py", line 248, in wrapper return func(self, options, args) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\commands\install.py", line 377, in run requirement_set = resolver.resolve( File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 92, in resolve result = self._result = resolver.resolve( File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 546, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 397, in resolve self._add_to_criteria(self.state.criteria, r, parent=None) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria if not criterion.candidates: File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\resolvelib\structs.py", line 156, in bool return bool(self._sequence) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 155, in bool return any(self) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 143, in return (c for c in iterator if id(c) not in self._incompatible_ids) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built candidate = func() File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 206, in _make_candidate_from_link self._link_candidate_cache[link] = LinkCandidate( File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 293, in init super().init( File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 156, in init self.dist = self._prepare() File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 225, in _prepare dist = self._prepare_distribution() File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 304, in _prepare_distribution return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\operations\prepare.py", line 516, in prepare_linked_requirement return self._prepare_linked_requirement(req, parallel_builds) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\operations\prepare.py", line 631, in _prepare_linked_requirement dist = _get_prepared_distribution( File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\operations\prepare.py", line 69, in _get_prepared_distribution abstract_dist.prepare_distribution_metadata( File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\distributions\sdist.py", line 48, in prepare_distribution_metadata self._install_build_reqs(finder) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\distributions\sdist.py", line 118, in _install_build_reqs build_reqs = self._get_build_requires_wheel() File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\distributions\sdist.py", line 95, in _get_build_requires_wheel return backend.get_requires_for_build_wheel() File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\utils\misc.py", line 692, in get_requires_for_build_wheel return super().get_requires_for_build_wheel(config_settings=cs) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 166, in get_requires_for_build_wheel return self._call_hook('get_requires_for_build_wheel', { File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 321, in _call_hook raise BackendUnavailable(data.get('traceback', '')) pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last): File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 77, in _build_backend obj = import_module(mod_path) File "importlib__init.py", line 126, in import_module File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Users\hawke\AppData\Local\Temp\pip-build-env-yqzsoikn\overlay\Lib\site-packages\setuptools__init__.py", line 15, in import setuptools.version File "C:\Users\hawke\AppData\Local\Temp\pip-build-env-yqzsoikn\overlay\Lib\site-packages\setuptools\version.py", line 1, in from ._importlib import metadata File "C:\Users\hawke\AppData\Local\Temp\pip-build-env-yqzsoikn\overlay\Lib\site-packages\setuptools_importlib.py", line 44, in import importlib.metadata as metadata # noqa: F401 *** File "importlib\metadata\init__.py", line 17, in File "importlib\metadata_adapters.py", line 3, in File "email\message.py", line 15, in File "email\utils.py", line 29, in File "socket.py", line 51, in *** ModuleNotFoundError: No module named '_socket'

AlUlkesh commented 1 year ago

What I figured out by now, is that the v1.0.0-pre release works differently than all other install options (clone, other releases, etc.)

It does not use venv. Instead it sets its own environment with its own versions of python, pip and so on.

So to try it out manually, setting venv is wrong in this case. Instead can you try out this, to see if you get the same error:

From the directory that contains environment.bat:

environment.bat
cd webui
pip install -r extensions\stable-diffusion-webui-images-browser\req_IR.txt --no-deps image-reward
WizardofAZ9 commented 1 year ago

The result of running the last step of that script. So yeah, seems like the same error.

Collecting image-reward Using cached image_reward-1.5-py3-none-any.whl (42 kB) Collecting datasets (from -r extensions\stable-diffusion-webui-images-browser\req_IR.txt (line 1)) Using cached datasets-2.13.1-py3-none-any.whl (486 kB) Collecting diffusers (from -r extensions\stable-diffusion-webui-images-browser\req_IR.txt (line 2)) Using cached diffusers-0.18.2-py3-none-any.whl (1.2 MB) Collecting dill (from -r extensions\stable-diffusion-webui-images-browser\req_IR.txt (line 3)) Using cached dill-0.3.6-py3-none-any.whl (110 kB) Collecting fairscale (from -r extensions\stable-diffusion-webui-images-browser\req_IR.txt (line 4)) Using cached fairscale-0.4.13.tar.gz (266 kB) Installing build dependencies ... done Getting requirements to build wheel ... done ERROR: Exception: Traceback (most recent call last): File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\cli\base_command.py", line 169, in exc_logging_wrapper status = run_func(*args) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\cli\req_command.py", line 248, in wrapper return func(self, options, args) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\commands\install.py", line 377, in run requirement_set = resolver.resolve( File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 92, in resolve result = self._result = resolver.resolve( File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 546, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 397, in resolve self._add_to_criteria(self.state.criteria, r, parent=None) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria if not criterion.candidates: File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\resolvelib\structs.py", line 156, in bool return bool(self._sequence) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 155, in bool return any(self) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 143, in return (c for c in iterator if id(c) not in self._incompatible_ids) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built candidate = func() File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 206, in _make_candidate_from_link self._link_candidate_cache[link] = LinkCandidate( File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 293, in init super().init( File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 156, in init self.dist = self._prepare() File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 225, in _prepare dist = self._prepare_distribution() File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 304, in _prepare_distribution return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\operations\prepare.py", line 516, in prepare_linked_requirement return self._prepare_linked_requirement(req, parallel_builds) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\operations\prepare.py", line 631, in _prepare_linked_requirement dist = _get_prepared_distribution( File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\operations\prepare.py", line 69, in _get_prepared_distribution abstract_dist.prepare_distribution_metadata( File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\distributions\sdist.py", line 48, in prepare_distribution_metadata self._install_build_reqs(finder) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\distributions\sdist.py", line 118, in _install_build_reqs build_reqs = self._get_build_requires_wheel() File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\distributions\sdist.py", line 95, in _get_build_requires_wheel return backend.get_requires_for_build_wheel() File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_internal\utils\misc.py", line 692, in get_requires_for_build_wheel return super().get_requires_for_build_wheel(config_settings=cs) File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 166, in get_requires_for_build_wheel return self._call_hook('get_requires_for_build_wheel', { File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 321, in _call_hook raise BackendUnavailable(data.get('traceback', '')) pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last): File "H:\Downloads\sd.webui\system\python\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 77, in _build_backend obj = import_module(mod_path) File "importlib__init.py", line 126, in import_module File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Users\hawke\AppData\Local\Temp\pip-build-env-_3y2yigz\overlay\Lib\site-packages\setuptools__init__.py", line 15, in import setuptools.version File "C:\Users\hawke\AppData\Local\Temp\pip-build-env-_3y2yigz\overlay\Lib\site-packages\setuptools\version.py", line 1, in from ._importlib import metadata File "C:\Users\hawke\AppData\Local\Temp\pip-build-env-_3y2yigz\overlay\Lib\site-packages\setuptools_importlib.py", line 44, in import importlib.metadata as metadata # noqa: F401 File "importlib\metadata\init__.py", line 17, in File "importlib\metadata_adapters.py", line 3, in File "email\message.py", line 15, in File "email\utils.py", line 29, in File "socket.py", line 51, in ModuleNotFoundError: No module named '_socket'

AlUlkesh commented 1 year ago

The weird thing is that this seems to be the actual error:

ModuleNotFoundError: No module named '_socket'

You should have a _socket.pyd file in your webui-subfolder system\python - Is it there?

After running environment.bat what is the output of the SET command?

WizardofAZ9 commented 1 year ago

Yes. _socket.pyd is there.

H:\Downloads\sd.webui>SET ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\hawke\AppData\Roaming ChocolateyInstall=C:\ProgramData\chocolatey ChocolateyLastPathUpdate=133205335678248905 CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files ComSpec=C:\WINDOWS\system32\cmd.exe DIR=H:\Downloads\sd.webui\system DriverData=C:\Windows\System32\Drivers\DriverData GIT_LFS_PATH=C:\Program Files\Git LFS GPA_GLOBAL_INJECTION_MODE=Auto HOMEDRIVE=C: HOMEPATH=\Users\hawke IGPA_DOMAIN_FILTER=C:\Users\hawke\Documents\GPA\domain.fltr INTEL_DEV_REDIST=C:\Program Files (x86)\Common Files\Intel\Shared Libraries\ JD2_HOME=C:\Users\hawke\AppData\Local\JDownloader 2.0 LOCALAPPDATA=C:\Users\hawke\AppData\Local LOGONSERVER=\DESKTOP-H0VHN1Q MIC_LD_LIBRARY_PATH=C:\Program Files (x86)\Common Files\Intel\Shared Libraries\compiler\lib\mic MONITOR_ADDRESS=localhost:12721 NUMBER_OF_PROCESSORS=12 OneDrive=C:\Users\hawke\OneDrive OPENSSL_ia32cap=:~0x20000000 OS=Windows_NT Path=C:\Windows\system32;C:\Windows;H:\Downloads\sd.webui\system\git\bin;H:\Downloads\sd.webui\system\python;H:\Downloads\sd.webui\system\python\Scripts PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW PIP_INSTALLER_LOCATION=H:\Downloads\sd.webui\system\python\get-pip.py PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=9e0a ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PROMPT=$P$G PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Intel\Wired Networking\ PUBLIC=C:\Users\Public PYTHONPATH=C:\Users\hawke\AppData\Local\Programs\Python\Python38 PY_LIBS=H:\Downloads\sd.webui\system\python\Scripts\Lib;H:\Downloads\sd.webui\system\python\Scripts\Lib\site-packages PY_PIP=H:\Downloads\sd.webui\system\python\Scripts SKIP_VENV=1 SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\Users\hawke\AppData\Local\Temp TMP=C:\Users\hawke\AppData\Local\Temp TRANSFORMERS_CACHE=H:\Downloads\sd.webui\system\transformers-cache USERDOMAIN=DESKTOP-H0VHN1Q USERDOMAIN_ROAMINGPROFILE=DESKTOP-H0VHN1Q USERNAME=hawke USERPROFILE=C:\Users\hawke windir=C:\WINDOWS

AlUlkesh commented 1 year ago

Well, this is wrong: PYTHONPATH=C:\Users\hawke\AppData\Local\Programs\Python\Python38

Since v1.0.0-pre uses its own python, there should be nothing pointing to another location. Try adding this to environment.bat: set PYTHONPATH=

Any change?

WizardofAZ9 commented 1 year ago

Okay that seemed to remove that entry from the list now when I run SET after environment.bat, but the error still occurs. The only difference I can see is towards the bottom. Before these lines just said File "", now they say File ""

File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed

This is my environment.bat

@echo off

set DIR=%~dp0system

set PATH=C:\Windows\system32;C:\Windows;%DIR%\git\bin;%DIR%\python;%DIR%\python\Scripts set PYTHONPATH= set PY_LIBS=%DIR%\python\Scripts\Lib;%DIR%\python\Scripts\Lib\site-packages set PY_PIP=%DIR%\python\Scripts set SKIP_VENV=1 set PIP_INSTALLER_LOCATION=%DIR%\python\get-pip.py set TRANSFORMERS_CACHE=%DIR%\transformers-cache

AlUlkesh commented 1 year ago

I'm fairly certain this is caused, because two different python environments are getting mixed somehow. However how and what caused this, I still don't know.

You can try the opposite approach, instead of deleting PYTHONPATH, what happens if you set it explicitly like this: set PYTHONPATH=%DIR%\python\Scripts\Lib;%DIR%\python\Scripts\Lib\site-packages

Also you can try and change the path order, in case there a python remnant in one of your Windows folders: set PATH=%DIR%\git\bin;%DIR%\python;%DIR%\python\Scripts;C:\Windows\system32;C:\Windows

WizardofAZ9 commented 1 year ago

Those didn't seem to have any effect on the error. Makes me wonder if I should be posting this inquiry here instead: https://github.com/AUTOMATIC1111/stable-diffusion-webui

Since they designed that package, maybe they know what is going on here?

AlUlkesh commented 1 year ago

I made another little fix. See if that helps.

If not, then yes, they might have encountered something like this before over there.

WizardofAZ9 commented 1 year ago

Still no change, so I'll investigate on the AUTOMATIC1111 git and see if anyone else knows what's going on. I appreciate the effort in looking into this error though.

WizardofAZ9 commented 1 year ago

I wasn't able to find any help on the other git but now that the 1.5.0-RC is out, I decided to scrap my v1.0.0-pre installation and move over to the 1.5.0-RC version. I'm not getting any more errors so I'm content. Thanks for looking into the problem. I suppose my advice to anyone else having this problem is not to use it with the v1.0.0-pre installation.

AlUlkesh commented 1 year ago

Good to hear you can get it running with the new version. Great.