"vscode:/vscode.git/clone" did not exist on "0e425603fb8ba12f1e7d09a1f58127347a94de98"
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:
class DiffusersLoader:
@classmethod
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")
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