From 63f32846bb2d49b4b9fb8352059a3ea7e21271ce Mon Sep 17 00:00:00 2001 From: Bryce Date: Sat, 4 Feb 2023 16:08:05 -0800 Subject: [PATCH] docs: no mps training; how change cache dir --- README.md | 7 +++++++ imaginairy/cmds.py | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/README.md b/README.md index 8df24d3..fd4726a 100644 --- a/README.md +++ b/README.md @@ -289,6 +289,13 @@ docker run -it --gpus all -v $HOME/.cache/huggingface:/root/.cache/huggingface - ## Running on Google Colab [Example Colab](https://colab.research.google.com/drive/1rOvQNs0Cmn_yU1bKWjCOHzGVDgZkaTtO?usp=sharing) +## Q&A + +**Q**: How do I change the cache directory for where models are stored? + +**A**: Set the `HUGGINGFACE_HUB_CACHE` environment variable. + + ## ChangeLog - perf: cli now has minimal overhead such that `aimg --help` runs in ~650ms instead of ~3400ms diff --git a/imaginairy/cmds.py b/imaginairy/cmds.py index 42c9d92..53035e4 100644 --- a/imaginairy/cmds.py +++ b/imaginairy/cmds.py @@ -875,6 +875,15 @@ def train_concept( You can find a lot of relevant instructions here: https://github.com/JoePenna/Dreambooth-Stable-Diffusion """ + from imaginairy.utils import get_device + + if "mps" in get_device(): + click.secho( + "⚠️ MPS (MacOS) is not supported for training. Please use a GPU or CPU.", + fg="yellow", + ) + return + import os.path from imaginairy.train import train_diffusion_model