aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/sd_models.py2
-rw-r--r--modules/shared.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index e63d3c29..b0e1d8bd 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -150,7 +150,7 @@ def load_model_weights(model, checkpoint_info):
devices.dtype = torch.float32 if shared.cmd_opts.no_half else torch.float16
- vae_file = os.path.splitext(checkpoint_file)[0] + ".vae.pt"
+ vae_file = shared.cmd_opts.vae_path or os.path.splitext(checkpoint_file)[0] + ".vae.pt"
if os.path.exists(vae_file):
print(f"Loading VAE weights from: {vae_file}")
vae_ckpt = torch.load(vae_file, map_location="cpu")
diff --git a/modules/shared.py b/modules/shared.py
index 1995a99a..b102451b 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -65,6 +65,7 @@ parser.add_argument("--autolaunch", action='store_true', help="open the webui UR
parser.add_argument("--use-textbox-seed", action='store_true', help="use textbox for seeds in UI (no up/down, but possible to input long seeds)", default=False)
parser.add_argument("--disable-console-progressbars", action='store_true', help="do not output progressbars to console", default=False)
parser.add_argument("--enable-console-prompts", action='store_true', help="print prompts to console when generating with txt2img and img2img", default=False)
+parser.add_argument('--vae-path', type=str, help='Path to Variational Autoencoders model', default=None)
parser.add_argument("--disable-safe-unpickle", action='store_true', help="disable checking pytorch models for malicious code", default=False)