Files
zccrs-comfyui-dci/__init__.py
T
JiDe Zhang 8b5b02d9c6 fix: resolve node connectivity issues by unifying BINARY_DATA type
DCIPreviewNode and BinaryFileSaver could not connect to DCIFileNode output
due to data type mismatch. This change unifies all binary data handling
to use the BINARY_DATA type consistently across all nodes.

Changes:
- Change DCIFileNode output type from DCI_BINARY_DATA to BINARY_DATA
- Remove unused DCI_BINARY_DATA type from codebase and documentation
- Update all related documentation and test files
- Add connectivity tests to verify the fix
- Simplify data type system for better node compatibility

This ensures all DCI-related nodes can properly connect and work together
in ComfyUI workflows.
2025-06-09 15:46:42 +08:00

72 lines
2.0 KiB
Python

"""
ComfyUI DCI Extension
A comprehensive ComfyUI extension for creating, previewing, and analyzing
DCI (DSG Combined Icons) format files.
This extension provides complete DCI specification support including:
- Multi-state icons (normal, hover, pressed, disabled)
- Multi-tone support (light and dark)
- Multiple scale factors and advanced metadata analysis
- Binary data handling and file operations
"""
# Try relative imports first, fall back to absolute imports
try:
from .py.nodes import (
DCIPreviewNode,
DCIImage,
DCIFileNode,
BinaryFileLoader,
BinaryFileSaver
)
except ImportError:
# Fallback for when module is loaded directly
import sys
import os
current_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, current_dir)
from py.nodes import (
DCIPreviewNode,
DCIImage,
DCIFileNode,
BinaryFileLoader,
BinaryFileSaver
)
# ComfyUI Node Registration
# Using DCI prefix to ensure unique node names and avoid conflicts
NODE_CLASS_MAPPINGS = {
"DCI_PreviewNode": DCIPreviewNode,
"DCI_Image": DCIImage,
"DCI_FileNode": DCIFileNode,
"DCI_BinaryFileLoader": BinaryFileLoader,
"DCI_BinaryFileSaver": BinaryFileSaver,
}
# Display names for ComfyUI interface
NODE_DISPLAY_NAME_MAPPINGS = {
"DCI_PreviewNode": "DCI Preview",
"DCI_Image": "DCI Image",
"DCI_FileNode": "DCI File",
"DCI_BinaryFileLoader": "Binary File Loader",
"DCI_BinaryFileSaver": "Binary File Saver",
}
# Extension metadata
__version__ = "1.0.0"
__author__ = "ComfyUI DCI Team"
__description__ = "DCI (DSG Combined Icons) format support for ComfyUI"
# Custom data types for ComfyUI
# These types are used for passing structured data between nodes
# ComfyUI will treat them as opaque data that can be passed between nodes
# but won't be displayed in the UI
CUSTOM_DATA_TYPES = {
"DCI_IMAGE_DATA": "DCI_IMAGE_DATA",
"BINARY_DATA": "BINARY_DATA"
}
# Export for ComfyUI
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']