Small update to allow comfyui_to_python.py to run from any subdirectory inside of ComfyUI.
This commit is contained in:
@@ -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.")
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user