From d8fdbb51688a30c6fea40de95611ef5279867e19 Mon Sep 17 00:00:00 2001 From: Jacob Segal Date: Tue, 18 Jul 2023 20:51:17 -0700 Subject: [PATCH] Don't display an error if there's no components directory --- custom_nodes/execution-inversion-demo-comfyui/components.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_nodes/execution-inversion-demo-comfyui/components.py b/custom_nodes/execution-inversion-demo-comfyui/components.py index 1a25fc6ba..ed4c064f3 100644 --- a/custom_nodes/execution-inversion-demo-comfyui/components.py +++ b/custom_nodes/execution-inversion-demo-comfyui/components.py @@ -200,6 +200,8 @@ def LoadComponent(component_file): def load_components(): component_dir = os.path.join(comfy_path, "components") + if not os.path.exists(component_dir): + return files = [f for f in os.listdir(component_dir) if os.path.isfile(os.path.join(component_dir, f)) and f.endswith(".json")] for f in files: print("Loading component file %s" % f)