0

Went through the instructions of installing git, python of both Stable Diffusion 1.5 and 2.0 (https://medium.com/geekculture/a-simple-way-to-run-stable-diffusion-2-0-locally-on-your-pc-no-code-guide-3beb911e444c guide for latest I used) and both don't work out on moment when I open webui-user.bat which is located in my

C:\SD2\stable-diffusion-webui-master

When launch webui-user.bat it says

Windows can't find "C:\SD2\stable-diffusion-webui-master\webui-user.bat" 
```- the very file I just clicked

When I launch cmd in that dir and try to use 
PS C:\SD2\stable-diffusion-webui-master> python launch.py

that what it gives to me:

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: <none>
Installing torch and torchvision
Traceback (most recent call last):
  File "C:\SD2\stable-diffusion-webui-master\launch.py", line 360, in <module>
    prepare_environment()
  File "C:\SD2\stable-diffusion-webui-master\launch.py", line 269, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "C:\SD2\stable-diffusion-webui-master\launch.py", line 87, in run
    result = subprocess.run(command, shell=True, env=os.environ if custom_env is None else custom_env)
  File "C:\Users\Sougo\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\Sougo\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\Sougo\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1438, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
PS C:\SD2\stable-diffusion-webui-master>

How do I fix?

I tried installing/uninstalling different Pythons: Python 3.10.6 for SD 1.5 and 3.11 for the 2.0 both leave the same issue. I tried changing

shell=True in that subprocess.py file

but didn't change anything as well

It uploads git repo with no problem, but

FileNotFoundError: [WinError 2] The system cannot find the file specified

is hard to get fix. I saw another variant of virtual machines cmd - but didn't even get how to open that cmd, I doubt I have it causing issue

  • You should probably ask this on that particular repository's issue tracker, not here. – AKX Feb 09 '23 at 12:41
  • 1
    (Also, by the way, editing any of the Python standard library files such as `subprocess.py` is a _terrible_ idea.) – AKX Feb 09 '23 at 12:44
  • How do I find that repo issue tracker? It's just Stable Diffusion GitHub mirror – Victor Slidan Slisyen Feb 09 '23 at 12:45
  • So... if I'm guessing right, it's Automatic1111's fork (not "just Stable Diffusion GitHub mirror"), so https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues is the issue tracker. – AKX Feb 09 '23 at 13:04

1 Answers1

0

You must install an updated version of python, since you have an old installer for an old version. It is useless to re-install it, you must update the installer, going to download the latest version from the official page, which is currently python-3.10.10-amd64

paima
  • 1