From 9f10b3ca8df7e1ca546924007ba31c718f6ce09e Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Tue, 29 Aug 2023 18:12:11 -0400 Subject: [PATCH] Add a __init__.py This repo can now be git cloned to the custom_nodes folder. --- __init__.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 __init__.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..ca6bb3b --- /dev/null +++ b/__init__.py @@ -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']