stable-diffusion-webui
stable-diffusion-webui copied to clipboard
fastapi Python error when running webui-user.bat
When running the Webui-user.bat script i'm encountering the following error at the stage of "Launching Web UI with arguments"

Am I doing something wrong or is it just something I need to alter?
Any help is much appreciated
Not that I'm aware of, I just followed the install instructions as per the creators notes
try setting your python path in the webui-user.bat file:
(edited spelling)
set PYTHON=C:\AI\stable-diffusion-webui\venv\Scripts\python.exe
Same error unfortunately
Here's the PR that added this, you could try removing those lines. Remember you can always make a copy of the file before editing.
The instructions stated that you should use python 3.10.6. 3.10.7 on mac is fine though.
Your PATH variable is not set to point to another or old Python installation before the newest one is it?
The top line tells me you're not running in a venv, who knows what version of fastapi you have on your system.
This is what I have my variables currently set to.
@dfaker Sorry I'm not quite sure what you mean, how can I make sure I'm running in a venv?
When you initially run the script it prints out the python version it's using like:
venv "C:\Users\depfa\stable-diffusion-webui\venv\Scripts\Python.exe"
The version in the venv with the dependencies installed.
At the top of your run it's printing your system level python exe, it's dependencies could be anything depending on what you've pip installed in the past, including older versions of fastApi
Ah ok thankyou
Thankyou all and @dfaker in particular for your help, I've managed to solve the issue now and can get the webui to launch.
Getting a cuda error now but I think it may just be to do with the gpu of the device i'm running it on
Thanks again