Merge pull request #14 from ScottNealon/patch-1

Parse all possible folders mapped to "llm"
This commit is contained in:
Zuellni
2024-02-03 15:11:39 +01:00
committed by GitHub
+4 -4
View File
@@ -20,10 +20,10 @@ from folder_paths import folder_names_and_paths, get_folder_paths, models_dir
class Loader: class Loader:
@classmethod @classmethod
def INPUT_TYPES(cls): def INPUT_TYPES(cls):
if not "llm" in folder_names_and_paths: add_model_folder_path("llm", str(Path(models_dir).joinpath("llm")))
folder_names_and_paths["llm"] = ([str(Path(models_dir) / "llm")],) for folder in get_folder_paths("llm"):
if Path(folder).is_dir():
for path in Path(get_folder_paths("llm")[0]).glob("*/"): for path in Path(folder).glob("*/"):
if (path / "config.json").is_file(): if (path / "config.json").is_file():
cls._MODELS[path.name] = path cls._MODELS[path.name] = path