LuckyOda's picture
Add files using upload-large-folder tool
ac360f6 verified
Raw
History Blame Contribute Delete
2.66 kB
# SPDX-License-Identifier: MIT
# Copyright (C) 2025 ComfyUI-Multiband Contributors
"""
ComfyUI-Multiband - Multi-channel image handling for ComfyUI.
This package provides a MULTIBAND_IMAGE type for handling images with arbitrary
number of channels (segmentation masks, feature maps, spectral bands, etc.)
along with nodes for loading, saving, previewing, and manipulating them.
"""
import os
from .multiband_types import MULTIBAND_IMAGE
from .nodes import (
LoadMultibandImage,
LoadMultibandFromPath,
SaveMultibandImage,
PreviewMultibandImage,
ImageToMultiband,
MultibandToImage,
MaskToMultiband,
MultibandToMasks,
BatchToMultiband,
ComposeMultiband,
DecomposeMultiband,
SelectMultibandChannels,
ConcatMultiband,
RenameMultibandChannels,
ResizeMultiband,
)
NODE_CLASS_MAPPINGS = {
# I/O
"MultibandLoad": LoadMultibandImage,
"MultibandLoadFromPath": LoadMultibandFromPath,
"MultibandSave": SaveMultibandImage,
"MultibandPreview": PreviewMultibandImage,
# Conversion
"MultibandFromImage": ImageToMultiband,
"MultibandToImage": MultibandToImage,
"MultibandFromMask": MaskToMultiband,
"MultibandToMasks": MultibandToMasks,
"MultibandFromBatch": BatchToMultiband,
# Compose/Decompose
"MultibandCompose": ComposeMultiband,
"MultibandDecompose": DecomposeMultiband,
# Operations
"MultibandSelectChannels": SelectMultibandChannels,
"MultibandConcat": ConcatMultiband,
"MultibandRenameChannels": RenameMultibandChannels,
"MultibandResize": ResizeMultiband,
}
NODE_DISPLAY_NAME_MAPPINGS = {
# I/O
"MultibandLoad": "Load Multiband Image",
"MultibandLoadFromPath": "Load Multiband Image from Path",
"MultibandSave": "Save Multiband Image",
"MultibandPreview": "Preview Multiband Image",
# Conversion
"MultibandFromImage": "Image to Multiband",
"MultibandToImage": "Multiband to Image",
"MultibandFromMask": "Mask to Multiband",
"MultibandToMasks": "Multiband to Masks",
"MultibandFromBatch": "Batch to Multiband",
# Compose/Decompose
"MultibandCompose": "Compose Multiband",
"MultibandDecompose": "Decompose Multiband",
# Operations
"MultibandSelectChannels": "Select Multiband Channels",
"MultibandConcat": "Concat Multiband",
"MultibandRenameChannels": "Rename Multiband Channels",
"MultibandResize": "Resize Multiband",
}
__all__ = [
'NODE_CLASS_MAPPINGS',
'NODE_DISPLAY_NAME_MAPPINGS',
'MULTIBAND_IMAGE',
]
WEB_DIRECTORY = os.path.join(os.path.dirname(__file__), "web")
print("ComfyUI-Multiband loaded: 15 nodes registered")