stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

fastapi Python error when running webui-user.bat

Open brettpaton23 opened this issue 1 year ago • 11 comments

When running the Webui-user.bat script i'm encountering the following error at the stage of "Launching Web UI with arguments"

image

Am I doing something wrong or is it just something I need to alter?

Any help is much appreciated

brettpaton23 avatar Oct 17 '22 11:10 brettpaton23

Not that I'm aware of, I just followed the install instructions as per the creators notes

brettpaton23 avatar Oct 17 '22 11:10 brettpaton23

try setting your python path in the webui-user.bat file:

(edited spelling)

set PYTHON=C:\AI\stable-diffusion-webui\venv\Scripts\python.exe 

ClashSAN avatar Oct 17 '22 11:10 ClashSAN

Same error unfortunately

brettpaton23 avatar Oct 17 '22 12:10 brettpaton23

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.

ClashSAN avatar Oct 17 '22 12:10 ClashSAN

The instructions stated that you should use python 3.10.6. 3.10.7 on mac is fine though.

A2Sumie avatar Oct 17 '22 12:10 A2Sumie

Your PATH variable is not set to point to another or old Python installation before the newest one is it?

mayofiddler avatar Oct 17 '22 16:10 mayofiddler

The top line tells me you're not running in a venv, who knows what version of fastapi you have on your system.

dfaker avatar Oct 17 '22 23:10 dfaker

image 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?

brettpaton23 avatar Oct 18 '22 01:10 brettpaton23

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

dfaker avatar Oct 18 '22 01:10 dfaker

Ah ok thankyou

brettpaton23 avatar Oct 18 '22 01:10 brettpaton23

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

brettpaton23 avatar Oct 18 '22 03:10 brettpaton23