@@ -2261,6 +2261,15 @@ def init_builtin_extra_nodes():
22612261 "nodes_preview_any.py" ,
22622262 ]
22632263
2264+ import_failed = []
2265+ for node_file in extras_files :
2266+ if not load_custom_node (os .path .join (extras_dir , node_file ), module_parent = "comfy_extras" ):
2267+ import_failed .append (node_file )
2268+
2269+ return import_failed
2270+
2271+
2272+ def init_builtin_api_nodes ():
22642273 api_nodes_dir = os .path .join (os .path .dirname (os .path .realpath (__file__ )), "comfy_api_nodes" )
22652274 api_nodes_files = [
22662275 "nodes_ideogram.py" ,
@@ -2277,25 +2286,36 @@ def init_builtin_extra_nodes():
22772286 ]
22782287
22792288 import_failed = []
2280- for node_file in extras_files :
2281- if not load_custom_node (os .path .join (extras_dir , node_file ), module_parent = "comfy_extras" ):
2282- import_failed .append (node_file )
2283-
22842289 for node_file in api_nodes_files :
22852290 if not load_custom_node (os .path .join (api_nodes_dir , node_file ), module_parent = "comfy_api_nodes" ):
22862291 import_failed .append (node_file )
22872292
22882293 return import_failed
22892294
22902295
2291- def init_extra_nodes (init_custom_nodes = True ):
2296+ def init_extra_nodes (init_custom_nodes = True , init_api_nodes = True ):
22922297 import_failed = init_builtin_extra_nodes ()
22932298
2299+ import_failed_api = []
2300+ if init_api_nodes :
2301+ import_failed_api = init_builtin_api_nodes ()
2302+
22942303 if init_custom_nodes :
22952304 init_external_custom_nodes ()
22962305 else :
22972306 logging .info ("Skipping loading of custom nodes" )
22982307
2308+ if len (import_failed_api ) > 0 :
2309+ logging .warning ("WARNING: some comfy_api_nodes/ nodes did not import correctly. This may be because they are missing some dependencies.\n " )
2310+ for node in import_failed_api :
2311+ logging .warning ("IMPORT FAILED: {}" .format (node ))
2312+ logging .warning ("\n This issue might be caused by new missing dependencies added the last time you updated ComfyUI." )
2313+ if args .windows_standalone_build :
2314+ logging .warning ("Please run the update script: update/update_comfyui.bat" )
2315+ else :
2316+ logging .warning ("Please do a: pip install -r requirements.txt" )
2317+ logging .warning ("" )
2318+
22992319 if len (import_failed ) > 0 :
23002320 logging .warning ("WARNING: some comfy_extras/ nodes did not import correctly. This may be because they are missing some dependencies.\n " )
23012321 for node in import_failed :
0 commit comments