From edb0e409dfe4e8faefc0fb3fdf2a8233d63d31ab Mon Sep 17 00:00:00 2001 From: yolain Date: Fri, 8 Nov 2024 15:20:16 +0800 Subject: [PATCH] Fix Missing wildcards directory. #517 --- __init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/__init__.py b/__init__.py index 7ce8f47..9bf058c 100644 --- a/__init__.py +++ b/__init__.py @@ -28,16 +28,16 @@ comfy_path = folder_paths.base_path #Wildcards from .py.libs.wildcards import read_wildcard_dict wildcards_path = os.path.join(os.path.dirname(__file__), "wildcards") +if not os.path.exists(wildcards_path): + os.mkdir(wildcards_path) + # Add custom wildcards example example_path = os.path.join(wildcards_path, "example.txt") if not os.path.exists(example_path): with open(example_path, 'w') as f: text = "blue\nred\nyellow\ngreen\nbrown\npink\npurple\norange\nblack\nwhite" f.write(text) -if os.path.exists(wildcards_path): - read_wildcard_dict(wildcards_path) -else: - os.mkdir(wildcards_path) +read_wildcard_dict(wildcards_path) #Styles styles_path = os.path.join(os.path.dirname(__file__), "styles")