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

[Bug]: ./webui.sh

Open govwin opened this issue 1 year ago • 4 comments

Checklist

  • [ ] The issue exists after disabling all extensions
  • [X] The issue exists on a clean installation of webui
  • [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • [X] The issue exists in the current version of the webui
  • [ ] The issue has not been reported before recently
  • [ ] The issue has been reported before but has not been fixed yet

What happened?

Installing torch and torchvision
Looking in indexes: https://download.pytorch.org/whl/rocm5.4.2
Collecting torch==2.0.1+rocm5.4.2
  Downloading https://download.pytorch.org/whl/rocm5.4.2/torch-2.0.1%2Brocm5.4.2-cp310-cp310-linux_x86_64.whl (1536.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ 1.5/1.5 GB 13.4 MB/s eta 0:00:01Killed
Traceback (most recent call last):
  File "/home/go/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/home/go/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/home/go/stable-diffusion-webui/modules/launch_utils.py", line 380, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "/home/go/stable-diffusion-webui/modules/launch_utils.py", line 115, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/home/go/stable-diffusion-webui/venv/bin/python3" -m pip install torch==2.0.1+rocm5.4.2 torchvision==0.15.2+rocm5.4.2 --index-url https://download.pytorch.org/whl/rocm5.4.2
Error code: 137
go@sd:~$ /home/go/stable-diffusion-webui/venv/bin/python3 --version

Steps to reproduce the problem

  1. wget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh
  2. chmod +x webui.sh
  3. ./webui.sh

What should have happened?

Assertion and hint about the reason for error when install script runs. Version of Python, pip, and setuptools.

What browsers do you use to access the UI ?

No response

Sysinfo

Not needed. Look at additional information.

Console logs

Not needed. Look at additional information.

Additional information

  1. Add Python version assert and throw error if more than Python3.10.6.
  2. Add upgrade pip and setuptools to the install script.
pip install --upgrade pip
pip install --upgrade setuptools

When Python3.10.6 is installed, pip and setuptools versions are not the latest. There is neither assertion nor a hint in this install script.

govwin avatar Mar 10 '24 10:03 govwin

Error code: 137 indicates that the process ran out of RAM.

Increase your SWAP memory.

codespearhead avatar Mar 12 '24 17:03 codespearhead

This is an LXC. I assigned more RAM, at least 5 GB, and no more Error code: 137. It never uses SWAP.

govwin avatar Mar 12 '24 23:03 govwin

@govwin can you close this issue then?

codespearhead avatar Mar 13 '24 00:03 codespearhead

Clearing pip cache solved this issue for me

pip cache purge

shivampip avatar May 01 '24 02:05 shivampip