Closed Sostay closed 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
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 😂
i have no 'venv' folder in my sd webui directory 😂
Oookay... How did you install a1111?
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.
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=
?
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%
That's webui.bat. How does your webui-user.bat look like?
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
And webui-user.bat is also how you start it?
I'm having the same problem even after trying to install it manually. Oddly enough, it still seems to work despite all the errors.
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.😂.😂.😂
I can't replicate this at all. The following information would be helpful:
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
@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.
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
*** 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
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
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
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
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?
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
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?
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 "
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
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
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?
I made another little fix. See if that helps.
If not, then yes, they might have encountered something like this before over there.
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.
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.
Good to hear you can get it running with the new version. Great.
After turning off this extension, there is no problem in starting it. how should i fix it ?