"examples/vscode:/vscode.git/clone" did not exist on "3105c710ba16fa2cf54d8deb158099a4146da511"
Commit 3d16077e authored by sALTaccount's avatar sALTaccount
Browse files

empty list if diffusers directory doesn't exist

parent c418d988
...@@ -223,8 +223,11 @@ class CheckpointLoaderSimple: ...@@ -223,8 +223,11 @@ class CheckpointLoaderSimple:
class DiffusersLoader: class DiffusersLoader:
@classmethod @classmethod
def INPUT_TYPES(cls): def INPUT_TYPES(cls):
return {"required": {"model_path": (os.listdir(os.path.join(folder_paths.models_dir, 'diffusers'), ),), paths = []
}} search_path = os.path.join(folder_paths.models_dir, 'diffusers')
if os.path.exists(search_path):
paths = next(os.walk(search_path))[1]
return {"required": {"model_path": (paths,), }}
RETURN_TYPES = ("MODEL", "CLIP", "VAE") RETURN_TYPES = ("MODEL", "CLIP", "VAE")
FUNCTION = "load_checkpoint" FUNCTION = "load_checkpoint"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment