Fixes PYTORCH_ENABLE_MPS_FALLBACK not set correctly

`torch` wasn't seeing the environment variable. I suspect this is because it was imported before the variable was set, so was running with a different environment.

Many `torch` ops are supported on MPS so this wasn't noticed immediately, but some samplers like k_dpm_2 still use unsupported operations and need this fallback.
This commit is contained in:
psychedelicious
2023-02-04 17:27:33 +11:00
parent b5160321bf
commit a1b1a48fb3
2 changed files with 3 additions and 6 deletions

View File

@ -1,7 +1,4 @@
#!/usr/bin/env python
import sys
import os
import ldm.invoke.CLI
ldm.invoke.CLI.main()