Rewrite part 1

Let's try this again
This commit is contained in:
City
2024-01-04 00:28:15 +01:00
parent f482f5ae8d
commit 4c668c91f0
8 changed files with 348 additions and 253 deletions
+15 -40
View File
@@ -1,44 +1,19 @@
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
# only import if running as a custom node
try:
import comfy.utils
except ImportError:
pass
else:
NODE_CLASS_MAPPINGS = {}
def remote_control():
global NODE_CLASS_MAPPINGS
global NODE_DISPLAY_NAME_MAPPINGS
from .nodes.remote_control import QueueRemote, FetchRemote
NODE_CLASS_MAPPINGS.update({
"QueueRemote": QueueRemote,
"FetchRemote": FetchRemote,
})
NODE_DISPLAY_NAME_MAPPINGS.update({
"QueueRemote": "Queue on remote",
"FetchRemote": "Fetch from remote",
})
from .nodes.images import NODE_CLASS_MAPPINGS as ImgNodes
NODE_CLASS_MAPPINGS.update(ImgNodes)
def remote_images():
global NODE_CLASS_MAPPINGS
global NODE_DISPLAY_NAME_MAPPINGS
from .nodes.remote_images import LoadImageUrl, SaveImageUrl
NODE_CLASS_MAPPINGS.update({
"LoadImageUrl": LoadImageUrl,
"SaveImageUrl": SaveImageUrl,
})
NODE_DISPLAY_NAME_MAPPINGS.update({
"LoadImageUrl": "Load Image (URL)",
"SaveImageUrl": "Save Image (URL)",
})
from .nodes.simple import NODE_CLASS_MAPPINGS as NetNodes
NODE_CLASS_MAPPINGS.update(NetNodes)
def remote_misc():
global NODE_CLASS_MAPPINGS
global NODE_DISPLAY_NAME_MAPPINGS
from .nodes.misc import CombineImageBatch
NODE_CLASS_MAPPINGS.update({
"CombineImageBatch": CombineImageBatch,
})
NODE_DISPLAY_NAME_MAPPINGS.update({
"CombineImageBatch": "Combine images",
})
from .nodes.advanced import NODE_CLASS_MAPPINGS as AdvNodes
NODE_CLASS_MAPPINGS.update(AdvNodes)
print("Loading network distribution node pack")
remote_control()
remote_images()
remote_misc()
NODE_DISPLAY_NAME_MAPPINGS = {k:v.TITLE for k,v in NODE_CLASS_MAPPINGS.items()}
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']