add models-directory launch argument (#9113)

This commit is contained in:
Silver
2026-07-08 16:20:47 +02:00
committed by GitHub
parent ffbecfffb9
commit 091b70edda
4 changed files with 27 additions and 1 deletions

View File

@@ -17,7 +17,11 @@ if args.base_directory:
else:
base_path = os.path.dirname(os.path.realpath(__file__))
models_dir = os.path.join(base_path, "models")
if args.models_directory:
models_dir = os.path.abspath(args.models_directory)
else:
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"])