Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Stable Diffusion WebUI Startup Error: Insufficient Memory, Unable to Install Torch #16882

Open
1 of 6 tasks
jeremt001 opened this issue Mar 8, 2025 · 1 comment
Open
1 of 6 tasks
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@jeremt001
Copy link

jeremt001 commented Mar 8, 2025

Checklist

  • The issue exists after disabling all extensions
  • 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
  • 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?

When I try to open webui-user.bat in stable-diffusion-webui, I repeatedly encounter the error "Error code: 1," indicating that there is insufficient memory. However, I have 25.6GB/32GB of RAM and 11.4GB/12GB of VRAM, which should be sufficient. I have also tried installing PyTorch and pip, and both were installed correctly, but the problem persists. I also tried running webui-user.bat as an administrator, but this causes it to fail to start, briefly flashing and closing without doing anything.

Steps to reproduce the problem

Go to the [Stable Diffusion WebUI] folder (e.g., C:\Users\jerem\stable-diffusion-webui).
Locate and run the webui-user.bat file.
Observe the error message stating "Insufficient memory" and that torch cannot be installed, even though there is enough system RAM and GPU memory.
Try running webui-user.bat as an administrator, but the window flashes and disappears without launching properly.
Check the startup logs and find the error message: "Could not install packages due to an OSError: ('Connection broken: OSError(12, 'Insufficient memory, cannot process this command')".

What should have happened?

Under normal circumstances, when I run the webui-user.bat file, Stable Diffusion WebUI should start successfully, and the necessary packages (such as PyTorch and torchvision) should be installed or initialized without any errors. There should be no "insufficient memory" error even though the system has sufficient RAM and GPU memory. The startup process should complete smoothly, and I should be able to access the WebUI interface and begin using Stable Diffusion.

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

I can't open the web UI, and when I try using --dump-sysinfo, it also throws an error.

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu121
Requirement already satisfied: torch==2.1.2 in c:\users\jerem\stable-diffusion-webui\venv\lib\site-packages (2.1.2+cu121)
ERROR: Could not install packages due to an OSError: ("Connection broken: OSError(12, '記憶體資源不足,無法處理此命令。', None, 8, None)", OSError(12, '記憶體資源不足,無法處理此命令。', None, 8, None))

WARNING: There was an error checking the latest version of pip.
Traceback (most recent call last):
  File "C:\Users\jerem\stable-diffusion-webui\launch.py", line 48, in <module>
    main()
  File "C:\Users\jerem\stable-diffusion-webui\launch.py", line 39, in main
    prepare_environment()
  File "C:\Users\jerem\stable-diffusion-webui\modules\launch_utils.py", line 381, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "C:\Users\jerem\stable-diffusion-webui\modules\launch_utils.py", line 116, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "C:\Users\jerem\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install torch==2.1.2 torchvision==0.16.2 --extra-index-url https://download.pytorch.org/whl/cu121
Error code: 1

Additional information

No response

@jeremt001 jeremt001 added the bug-report Report of a bug, yet to be confirmed label Mar 8, 2025
@jeremt001
Copy link
Author

python: 3.10.6

OS: WIN11 23H2

CPU: i5 14500

GPU: RTX 4070

RAM: 32G

SSD: 1T+2T

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

1 participant