mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-10 02:27:05 +08:00
Added comfy_base_path and multiple subpaths that are not affected by base_directory
This commit is contained in:
parent
042a905c37
commit
6716679940
@ -14,10 +14,11 @@ supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.pt2', '.bin', '.pth', '.s
|
|||||||
folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {}
|
folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {}
|
||||||
|
|
||||||
# --base-directory - Resets all default paths configured in folder_paths with a new base path
|
# --base-directory - Resets all default paths configured in folder_paths with a new base path
|
||||||
|
comfy_base_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
if args.base_directory:
|
if args.base_directory:
|
||||||
base_path = os.path.abspath(args.base_directory)
|
base_path = os.path.abspath(args.base_directory)
|
||||||
else:
|
else:
|
||||||
base_path = os.path.dirname(os.path.realpath(__file__))
|
base_path = comfy_base_path
|
||||||
|
|
||||||
models_dir = os.path.join(base_path, "models")
|
models_dir = os.path.join(base_path, "models")
|
||||||
folder_names_and_paths["checkpoints"] = ([os.path.join(models_dir, "checkpoints")], supported_pt_extensions)
|
folder_names_and_paths["checkpoints"] = ([os.path.join(models_dir, "checkpoints")], supported_pt_extensions)
|
||||||
@ -51,6 +52,14 @@ temp_directory = os.path.join(base_path, "temp")
|
|||||||
input_directory = os.path.join(base_path, "input")
|
input_directory = os.path.join(base_path, "input")
|
||||||
user_directory = os.path.join(base_path, "user")
|
user_directory = os.path.join(base_path, "user")
|
||||||
|
|
||||||
|
app_directory = os.path.join(comfy_base_path, "app")
|
||||||
|
comfy_directory = os.path.join(comfy_base_path, "comfy")
|
||||||
|
comfy_execution_directory = os.path.join(comfy_base_path, "comfy_execution")
|
||||||
|
comfy_extras_directory = os.path.join(comfy_base_path, "comfy_extras")
|
||||||
|
notebooks_directory = os.path.join(comfy_base_path, "notebooks")
|
||||||
|
utils_directory = os.path.join(comfy_base_path, "utils")
|
||||||
|
web_directory = os.path.join(comfy_base_path, "web")
|
||||||
|
|
||||||
filename_list_cache: dict[str, tuple[list[str], dict[str, float], float]] = {}
|
filename_list_cache: dict[str, tuple[list[str], dict[str, float], float]] = {}
|
||||||
|
|
||||||
class CacheHelper:
|
class CacheHelper:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user