diff options
author | Max Audron <audron@cocaine.farm> | 2023-01-25 16:15:42 +0000 |
---|---|---|
committer | Max Audron <audron@cocaine.farm> | 2023-01-27 13:44:30 +0000 |
commit | 5eee2ac39863f9e44591b50d0710dd2615416a13 (patch) | |
tree | 72d90317db4e724a9d9ace4f9e8d8f2d4467d5e9 /modules/upscaler.py | |
parent | 9beb794e0b0dc1a0f9e89d8e38bd789a8c608397 (diff) | |
download | stable-diffusion-webui-gfx803-5eee2ac39863f9e44591b50d0710dd2615416a13.tar.gz stable-diffusion-webui-gfx803-5eee2ac39863f9e44591b50d0710dd2615416a13.tar.bz2 stable-diffusion-webui-gfx803-5eee2ac39863f9e44591b50d0710dd2615416a13.zip |
add data-dir flag and set all user data directories based on it
Diffstat (limited to 'modules/upscaler.py')
-rw-r--r-- | modules/upscaler.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/upscaler.py b/modules/upscaler.py index a5bf5acb..e2eaa730 100644 --- a/modules/upscaler.py +++ b/modules/upscaler.py @@ -11,7 +11,6 @@ from modules import modelloader, shared LANCZOS = (Image.Resampling.LANCZOS if hasattr(Image, 'Resampling') else Image.LANCZOS) NEAREST = (Image.Resampling.NEAREST if hasattr(Image, 'Resampling') else Image.NEAREST) -from modules.paths import models_path class Upscaler: @@ -39,7 +38,7 @@ class Upscaler: self.mod_scale = None if self.model_path is None and self.name: - self.model_path = os.path.join(models_path, self.name) + self.model_path = os.path.join(shared.models_path, self.name) if self.model_path and create_dirs: os.makedirs(self.model_path, exist_ok=True) @@ -143,4 +142,4 @@ class UpscalerNearest(Upscaler): def __init__(self, dirname=None): super().__init__(False) self.name = "Nearest" - self.scalers = [UpscalerData("Nearest", None, self)]
\ No newline at end of file + self.scalers = [UpscalerData("Nearest", None, self)] |