mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-17 01:13:34 +00:00
Allow override of models base path via env var
This commit is contained in:
parent
f3566f0894
commit
17b70728ec
@ -11,7 +11,8 @@ supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.bin', '.pth', '.safetenso
|
||||
|
||||
folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {}
|
||||
|
||||
base_path = os.path.dirname(os.path.realpath(__file__))
|
||||
env_base_path = os.environ.get("COMFYUI_FOLDERS_BASE_PATH")
|
||||
base_path = os.path.dirname(os.path.realpath(__file__)) if env_base_path is None else env_base_path
|
||||
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["configs"] = ([os.path.join(models_dir, "configs")], [".yaml"])
|
||||
|
Loading…
Reference in New Issue
Block a user