aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-10-11 18:33:57 +0300
committerAUTOMATIC <16777216c@gmail.com>2022-10-11 18:33:57 +0300
commit6d09b8d1df3a96e1380bb1650f5961781630af96 (patch)
tree43c91f918ba0a53492c6e0a7410cd4c41df45230
parentd682444ecc99319fbd2b142a12727501e2884ba7 (diff)
produce error when training with medvram/lowvram enabled
-rw-r--r--modules/hypernetworks/ui.py2
-rw-r--r--modules/textual_inversion/ui.py3
2 files changed, 5 insertions, 0 deletions
diff --git a/modules/hypernetworks/ui.py b/modules/hypernetworks/ui.py
index cdddcce1..3541a388 100644
--- a/modules/hypernetworks/ui.py
+++ b/modules/hypernetworks/ui.py
@@ -25,6 +25,8 @@ def train_hypernetwork(*args):
initial_hypernetwork = shared.loaded_hypernetwork
+ assert not shared.cmd_opts.lowvram and not shared.cmd_opts.medvram, 'Training models with lowvram or medvram is not possible'
+
try:
sd_hijack.undo_optimizations()
diff --git a/modules/textual_inversion/ui.py b/modules/textual_inversion/ui.py
index c57de1f9..70f47343 100644
--- a/modules/textual_inversion/ui.py
+++ b/modules/textual_inversion/ui.py
@@ -22,6 +22,9 @@ def preprocess(*args):
def train_embedding(*args):
+
+ assert not shared.cmd_opts.lowvram and not shared.cmd_opts.medvram, 'Training models with lowvram or medvram is not possible'
+
try:
sd_hijack.undo_optimizations()