aboutsummaryrefslogtreecommitdiff
path: root/extensions-builtin
diff options
context:
space:
mode:
authorcatboxanon <122327233+catboxanon@users.noreply.github.com>2024-02-15 14:22:13 -0500
committercatboxanon <122327233+catboxanon@users.noreply.github.com>2024-02-15 14:22:13 -0500
commit06ab10a1be812036605e1472f054228562ea08d9 (patch)
tree37ca6e6ac0617387389c8ff11be83152a58a947c /extensions-builtin
parentb7f45e67dcf48914d2f34d4ace977a431a5aa12e (diff)
Normalize cmd arg paths
In particular, this fixes an issue on Windows where some functions will misbehave if forward slashes are provided rather than double backslashes.
Diffstat (limited to 'extensions-builtin')
-rw-r--r--extensions-builtin/Lora/preload.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/extensions-builtin/Lora/preload.py b/extensions-builtin/Lora/preload.py
index 50961be3..52fab29b 100644
--- a/extensions-builtin/Lora/preload.py
+++ b/extensions-builtin/Lora/preload.py
@@ -1,7 +1,8 @@
import os
from modules import paths
+from modules.paths_internal import normalized_filepath
def preload(parser):
- parser.add_argument("--lora-dir", type=str, help="Path to directory with Lora networks.", default=os.path.join(paths.models_path, 'Lora'))
- parser.add_argument("--lyco-dir-backcompat", type=str, help="Path to directory with LyCORIS networks (for backawards compatibility; can also use --lyco-dir).", default=os.path.join(paths.models_path, 'LyCORIS'))
+ parser.add_argument("--lora-dir", type=normalized_filepath, help="Path to directory with Lora networks.", default=os.path.join(paths.models_path, 'Lora'))
+ parser.add_argument("--lyco-dir-backcompat", type=normalized_filepath, help="Path to directory with LyCORIS networks (for backawards compatibility; can also use --lyco-dir).", default=os.path.join(paths.models_path, 'LyCORIS'))