Improve vanilla node importing for execution nodes

This commit is contained in:
doctorpangloss 2024-10-04 10:56:43 -07:00
parent 144fe6c421
commit de45dd50c5

View File

@ -162,11 +162,15 @@ def mitigated_import_of_vanilla_custom_nodes() -> ExportedNodes:
# found. we're in the middle of executing the import of execution and server, in all likelihood, so like all things,
# the way community custom nodes is pretty radioactive
from ..cmd import cuda_malloc, folder_paths, latent_preview
from .. import graph, graph_utils, caching
from .. import node_helpers
for module in (cuda_malloc, folder_paths, latent_preview, node_helpers):
module_short_name = module.__name__.split(".")[-1]
sys.modules[module_short_name] = module
sys.modules['nodes'] = base_nodes
sys.modules['comfy_execution.graph'] = graph
sys.modules['comfy_execution.graph_utils'] = graph_utils
sys.modules['comfy_execution.caching'] = caching
from ..cmd import execution, server
for module in (execution, server):
module_short_name = module.__name__.split(".")[-1]