AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.37k stars 26.72k forks source link

[Bug]: Calling webui-user.bat hangs because python commands are not called with 'call' statement #16205

Open stevenengland opened 3 months ago

stevenengland commented 3 months ago

Checklist

What happened?

Calling webui-user.bat in a fresh installations hangs forever.

This is due to how python behaves on Windows if python calls are not called with 'call'. The solution is to change all lines where a python command is invoked in webui.bat.

call %PYTHON% -c "" >tmp/stdout.txt 2>tmp/stderr.txt
call %PYTHON% -mpip --help >tmp/stdout.txt 2>tmp/stderr.txt
call %PYTHON% "%PIP_INSTALLER_LOCATION%" >tmp/stdout.txt 2>tmp/stderr.txt
call %PYTHON_FULLNAME% -m venv "%VENV_DIR%" >tmp/stdout.txt 2>tmp/stderr.txt

Steps to reproduce the problem

  1. webui-user.bat

What should have happened?

Webui launch script should make progress and start somewhen

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

Since WebUI doesn't start without help this is not appropriate ;)

I am using python 3.10.5 via pyenv-win on Windows 11 latest.

Console logs

No logs generated in tmp/*, stderr and stdout are empty.

Additional information

nothing to add here.

viking1304 commented 2 months ago

set PYTHON=call python in webui-user.bat is enough. I just tested before I updated my https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/16261#issuecomment-2250806110

yamfun commented 2 months ago

latest dev branch will stuck on startup after the line "Commit hash", pressing ctrl z after a while show call stacks with bottom lines with "... _wait_for_tstate_lock if lock.acquire(block, timeout): ...."

switching back to master will not stuck