Skip to content

Commit 32d42bf

Browse files
authored
Merge pull request #133 from xiaoxidashen/main
Fix comfyui_to_python_utils import error, Fix conflict between comfy/utils.py and utils,Fix not await for load extra nodes
2 parents 281b840 + b215c83 commit 32d42bf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

comfyui_to_python.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
import black
1313

14-
14+
# Add current directory to Python path
15+
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
1516
from comfyui_to_python_utils import (
1617
import_custom_nodes,
1718
find_path,

comfyui_to_python_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def import_custom_nodes() -> None:
1212
import asyncio
1313
import execution
1414
from nodes import init_extra_nodes
15+
sys.path.insert(0, find_path("ComfyUI"))
1516
import server
1617

1718
# Creating a new event loop and setting it as the default loop
@@ -23,7 +24,7 @@ def import_custom_nodes() -> None:
2324
execution.PromptQueue(server_instance)
2425

2526
# Initializing custom nodes
26-
init_extra_nodes()
27+
asyncio.run(init_extra_nodes())
2728

2829

2930
def find_path(name: str, path: str = None) -> str:

0 commit comments

Comments
 (0)