mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-09 13:50:49 +08:00
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:
parent
de44b95db6
commit
ba07c89407
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user