Commit Graph

8 Commits

Author SHA1 Message Date
0fd706f392 Bring back the ability to run on CPU on PCs with CUDA-compatible GPUs 2023-03-10 10:19:55 +05:30
1496d6ec51 Hotfix rollup
* Reverts the recent 'torch.mps' changes since .mps is only available in torch v2.0, which isn't yet released.
* Includes Hotfitx 984
* Enables 'cpu-only' option when running on Apple silicon.
2023-03-09 14:10:29 -07:00
d1a45ed9ac Report the device GPU memory (and existence) correctly for mps (mac) 2023-03-09 21:15:00 +05:30
11265c4034 Add support for MPS when running on Apple silicon
Changes:

* autodetect if MPS is available and the pytorch version has MPS support.
* change logic from "is the device CPU?" to "is the device not CUDA?".
* set PYTORCH_ENABLE_MPS_FALLBACK=1

Known issues:

* Some samplers (eg DDIM) will fail on MPS unless forced to CPU-only mode
2023-03-07 14:57:37 -07:00
2eb317c6b6 Format code, PEP8 using Black 2023-02-14 18:47:50 +05:30
733439da07 Fix a memory leak. Apparently the Exception object keeps references to torch Tensors in the stack, so keeping a reference to the Exception object prevents those Tensors from getting garbage-collected. 2023-02-01 11:49:18 +05:30
5eeef41d8c Update to use the latest sdkit API 2022-12-20 15:16:47 +05:30
47e3884994 Rename the python package name to easydiffusion (from sd_internal) 2022-12-19 19:39:15 +05:30