mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-09 15:17:08 +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]]] = {}
|
||||
|
||||
# --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:
|
||||
base_path = os.path.abspath(args.base_directory)
|
||||
else:
|
||||
base_path = os.path.dirname(os.path.realpath(__file__))
|
||||
base_path = comfy_base_path
|
||||
|
||||
models_dir = os.path.join(base_path, "models")
|
||||
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")
|
||||
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]] = {}
|
||||
|
||||
class CacheHelper:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user