[bug]: PYTORCH_ENABLE_MPS_FALLBACK=1 is not set
Is there an existing issue for this?
- [X] I have searched the existing issues
OS
macOS
GPU
mps
VRAM
No response
What happened?
PYTORCH_ENABLE_MPS_FALLBACK=1 is not set. It needs to be set before invoke.py is run, for MPS systems specifically.
Screenshots
No response
Additional context
No response
Contact Details
No response
it should be being set in the invoke.sh in the root of the repo (not the one in scripts). i think this is preferable to patching .venv/bin/activate , but open to differing opinions.
temporary work-around for those getting 'could not generate image' type errors on console when running on M1 Mac was for me to add the PYTORCH_ENABLE_MPS_FALLBACK setting into existing invoke.sh as suggested above. e.g. adding export PYTORCH_ENABLE_MPS_FALLBACK=1
#!/usr/bin/env sh
export PYTORCH_ENABLE_MPS_FALLBACK=1
set -eu
. .venv/bin/activate
echo "Do you want to generate images using the"
echo "1. command-line"
echo "2. browser-based UI"
echo "OR"
echo "3. open the developer console"
echo "Please enter 1, 2, or 3:"
read choice
this isn’t happening because #1660, which contained commits to implement it, was “superseded” and closed