From af2951ed53da6d357aea9232538f9ea7e1cdc648 Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Thu, 28 Dec 2023 06:52:33 +0900 Subject: base default image output on data_path Co-Authored-By: Alberto Cano <34340962+canoalberto@users.noreply.github.com> --- modules/paths_internal.py | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/paths_internal.py') diff --git a/modules/paths_internal.py b/modules/paths_internal.py index 89131a54..b86ecd7f 100644 --- a/modules/paths_internal.py +++ b/modules/paths_internal.py @@ -28,5 +28,6 @@ models_path = os.path.join(data_path, "models") extensions_dir = os.path.join(data_path, "extensions") extensions_builtin_dir = os.path.join(script_path, "extensions-builtin") config_states_dir = os.path.join(script_path, "config_states") +default_output_dir = os.path.join(data_path, "output") roboto_ttf_file = os.path.join(modules_path, 'Roboto-Regular.ttf') -- cgit v1.2.3 From 06ab10a1be812036605e1472f054228562ea08d9 Mon Sep 17 00:00:00 2001 From: catboxanon <122327233+catboxanon@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:22:13 -0500 Subject: 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. --- modules/paths_internal.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/paths_internal.py') diff --git a/modules/paths_internal.py b/modules/paths_internal.py index b86ecd7f..2ed1392a 100644 --- a/modules/paths_internal.py +++ b/modules/paths_internal.py @@ -4,6 +4,10 @@ import argparse import os import sys import shlex +from pathlib import Path + + +normalized_filepath = lambda filepath: str(Path(filepath).resolve()) commandline_args = os.environ.get('COMMANDLINE_ARGS', "") sys.argv += shlex.split(commandline_args) -- cgit v1.2.3 From 0b07a6cf26634ea758d9fd67b4d4222cf9ec1617 Mon Sep 17 00:00:00 2001 From: AUTOMATIC1111 <16777216c@gmail.com> Date: Sat, 2 Mar 2024 06:35:46 +0300 Subject: Merge pull request #15035 from AUTOMATIC1111/fix/normalized-filepath-absolute Use `absolute` path for normalized filepath --- modules/paths_internal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/paths_internal.py') diff --git a/modules/paths_internal.py b/modules/paths_internal.py index 2ed1392a..6058b0cd 100644 --- a/modules/paths_internal.py +++ b/modules/paths_internal.py @@ -7,7 +7,7 @@ import shlex from pathlib import Path -normalized_filepath = lambda filepath: str(Path(filepath).resolve()) +normalized_filepath = lambda filepath: str(Path(filepath).absolute()) commandline_args = os.environ.get('COMMANDLINE_ARGS', "") sys.argv += shlex.split(commandline_args) -- cgit v1.2.3