Add a __init__.py

This repo can now be git cloned to the custom_nodes folder.
This commit is contained in:
comfyanonymous
2023-08-29 18:12:11 -04:00
committed by GitHub
parent 73703bc723
commit 9f10b3ca8d
+21
View File
@@ -0,0 +1,21 @@
import importlib
import os
node_list = [ #Add list of .py files containing nodes here
"advanced_model_merging",
"reference_only",
"sampler_rescalecfg",
"sampler_tonemap",
"sdxl_model_merging"
]
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
for module_name in node_list:
imported_module = importlib.import_module(".{}".format(module_name), __name__)
NODE_CLASS_MAPPINGS = {**NODE_CLASS_MAPPINGS, **imported_module.NODE_CLASS_MAPPINGS}
NODE_DISPLAY_NAME_MAPPINGS = {**NODE_DISPLAY_NAME_MAPPINGS, **imported_module.NODE_DISPLAY_NAME_MAPPINGS}
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']