Skip to content

Conversation

@shinriyo
Copy link

@shinriyo shinriyo commented Feb 8, 2025

fix for this

ERROR: Could not find a version that satisfies the requirement torch==2.3.1 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2)
ERROR: No matching distribution found for torch==2.3.1
Traceback (most recent call last):
  File "/Users/shinriyo/development/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/Users/shinriyo/development/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/Users/shinriyo/development/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 "/Users/shinriyo/development/stable-diffusion-webui/modules/launch_utils.py", line 116, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/Users/shinriyo/development/stable-diffusion-webui/venv/bin/python" -m pip install torch==2.3.1 torchvision==0.18.1
Error code: 1

Description

  • a simple description of what you're trying to accomplish
  • a summary of changes in code
  • which issues it fixes, if any

Screenshots/videos:

Checklist:

fix for this
```
ERROR: Could not find a version that satisfies the requirement torch==2.3.1 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2)
ERROR: No matching distribution found for torch==2.3.1
Traceback (most recent call last):
  File "/Users/shinriyo/development/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/Users/shinriyo/development/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/Users/shinriyo/development/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 "/Users/shinriyo/development/stable-diffusion-webui/modules/launch_utils.py", line 116, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/Users/shinriyo/development/stable-diffusion-webui/venv/bin/python" -m pip install torch==2.3.1 torchvision==0.18.1
Error code: 1
```
w-e-w

This comment was marked as duplicate.

@w-e-w w-e-w changed the base branch from master to dev February 8, 2025 09:03
@w-e-w w-e-w requested a review from catboxanon as a code owner February 8, 2025 09:03
@tyn513
Copy link

tyn513 commented Mar 21, 2025

good job..

@tyn513
Copy link

tyn513 commented Mar 21, 2025

i wasted a lot of time, and finally i found this..

@shinriyo
Copy link
Author

@tyn513
Cảm ơn. You're very welcome.

@viking1304
Copy link
Contributor

viking1304 commented Jul 1, 2025

@w-e-w Please nuke this PR. Torch 2.2.2 does not work properly and brake all "A" samplers on Mac.

As I already wrote many times, people on ARM Macs need to use Homebrew for Mac, not Homebrew for Intel.
#5461 (comment)

@shinriyo This will "work", but not as it should. You can find more info here. That was the reason I left Intel at 2.1.2, and not updated Torch to 2.2.2.

I am 99.99% sure you are running Intel version of Homebrew on ARM Mac. Please run this:

([[ "$(which brew)" == /opt/homebrew/* ]] && echo "You are using ARM version of Homebrew" || echo "You are using Intel version of Homebrew")

EDIT:

Also try this:

file "$(command -v python3.10)"

This is proper, expected result:

❯ file "$(command -v python3.10)"
/opt/homebrew/bin/python3.10: Mach-O 64-bit executable arm64

I can bet yours will say something like

/opt/homebrew/bin/python3.10: Mach-O 64-bit executable x86_64

@viking1304
Copy link
Contributor

i wasted a lot of time, and finally i found this..

This is not a proper solution. This will work, but version of PyTorch was buggy, and it will not work with all samplers. Please read my comment above.

@w-e-w w-e-w closed this Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants