From 348aeea2584e614b319cdcf2bea171ec4e45fff7 Mon Sep 17 00:00:00 2001 From: Scott Nealon Date: Fri, 2 Feb 2024 22:12:50 -0500 Subject: [PATCH] Parse all possible folders mapped to "llm" --- exllama.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exllama.py b/exllama.py index e8cf3d2..6901bd5 100644 --- a/exllama.py +++ b/exllama.py @@ -20,12 +20,12 @@ from folder_paths import folder_names_and_paths, get_folder_paths, models_dir class Loader: @classmethod def INPUT_TYPES(cls): - if not "llm" in folder_names_and_paths: - folder_names_and_paths["llm"] = ([str(Path(models_dir) / "llm")],) - - for path in Path(get_folder_paths("llm")[0]).glob("*/"): - if (path / "config.json").is_file(): - cls._MODELS[path.name] = path + add_model_folder_path("llm", str(Path(models_dir).joinpath("llm"))) + for folder in get_folder_paths("llm"): + if Path(folder).is_dir(): + for path in Path(folder).glob("*/"): + if (path / "config.json").is_file(): + cls._MODELS[path.name] = path models = list(cls._MODELS.keys()) default = models[0] if models else None