Skip to content

Commit aa54166

Browse files
committedSep 14, 2024
Small update to allow comfyui_to_python.py to run from any subdirectory inside of ComfyUI.
1 parent d5b1896 commit aa54166

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed
 

‎comfyui_to_python.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
get_value_at_index,
2121
)
2222

23-
sys.path.append("../")
23+
add_comfyui_directory_to_sys_path()
2424
from nodes import NODE_CLASS_MAPPINGS
2525

2626

@@ -617,7 +617,7 @@ def main() -> None:
617617
default=DEFAULT_QUEUE_SIZE,
618618
)
619619
pargs = parser.parse_args()
620-
ComfyUItoPython(**vars(pargs))
620+
run(**vars(pargs))
621621
print("Done.")
622622

623623

‎comfyui_to_python_utils.py

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
from typing import Sequence, Mapping, Any, Union
33
import sys
44

5-
sys.path.append("../")
6-
75

86
def import_custom_nodes() -> None:
97
"""Find all custom nodes in the custom_nodes folder and add those node objects to NODE_CLASS_MAPPINGS

0 commit comments

Comments
 (0)
Please sign in to comment.