aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2023-01-25 17:15:42 +0100
committerMax Audron <audron@cocaine.farm>2023-01-27 14:44:30 +0100
commit5eee2ac39863f9e44591b50d0710dd2615416a13 (patch)
tree72d90317db4e724a9d9ace4f9e8d8f2d4467d5e9 /modules/sd_models.py
parent9beb794e0b0dc1a0f9e89d8e38bd789a8c608397 (diff)
add data-dir flag and set all user data directories based on it
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index 37dad18d..b2d48a51 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -12,13 +12,13 @@ import ldm.modules.midas as midas
from ldm.util import instantiate_from_config
-from modules import shared, modelloader, devices, script_callbacks, sd_vae, sd_disable_initialization, errors, hashes, sd_models_config
+from modules import paths, shared, modelloader, devices, script_callbacks, sd_vae, sd_disable_initialization, errors, hashes, sd_models_config
from modules.paths import models_path
from modules.sd_hijack_inpainting import do_inpainting_hijack
from modules.timer import Timer
model_dir = "Stable-diffusion"
-model_path = os.path.abspath(os.path.join(models_path, model_dir))
+model_path = os.path.abspath(os.path.join(paths.models_path, model_dir))
checkpoints_list = {}
checkpoint_alisases = {}
@@ -307,7 +307,7 @@ def enable_midas_autodownload():
location automatically.
"""
- midas_path = os.path.join(models_path, 'midas')
+ midas_path = os.path.join(paths.models_path, 'midas')
# stable-diffusion-stability-ai hard-codes the midas model path to
# a location that differs from where other scripts using this model look.