Create custom_nodes dir if does not exist

Avoids a crash from ComfyUI expecting the custom_nodes dir by
ensuring it exists.
This commit is contained in:
06kellyjac 2025-09-10 18:43:25 +01:00
parent de44b95db6
commit ba07c89407

View File

@ -103,6 +103,14 @@ if not os.path.exists(input_directory):
except:
logging.error("Failed to create input directory")
custom_nodes_paths, _ = folder_names_and_paths["custom_nodes"]
for directory in custom_nodes_paths:
if not os.path.exists(directory):
try:
os.makedirs(directory)
except:
logging.error(f"Failed to create custom_nodes directory: {directory}")
def set_output_directory(output_dir: str) -> None:
global output_directory
output_directory = output_dir