diff --git a/comfyui_to_python.py b/comfyui_to_python.py index 69cdc06..9b61692 100644 --- a/comfyui_to_python.py +++ b/comfyui_to_python.py @@ -20,7 +20,7 @@ from comfyui_to_python_utils import ( get_value_at_index, ) -sys.path.append("../") +add_comfyui_directory_to_sys_path() from nodes import NODE_CLASS_MAPPINGS @@ -617,7 +617,7 @@ def main() -> None: default=DEFAULT_QUEUE_SIZE, ) pargs = parser.parse_args() - ComfyUItoPython(**vars(pargs)) + run(**vars(pargs)) print("Done.") diff --git a/comfyui_to_python_utils.py b/comfyui_to_python_utils.py index ef10a49..12b3be2 100644 --- a/comfyui_to_python_utils.py +++ b/comfyui_to_python_utils.py @@ -2,8 +2,6 @@ import os from typing import Sequence, Mapping, Any, Union import sys -sys.path.append("../") - def import_custom_nodes() -> None: """Find all custom nodes in the custom_nodes folder and add those node objects to NODE_CLASS_MAPPINGS