Files
Limbicnation-ComfyUI-Transp…/__init__.py
T
limbicnation b727939b99 fix(grabcut): resolve ComfyUI tensor format compatibility errors
Fixes "Cannot handle this data type: (1, 1, 1024), |u1" error in PreviewImage node:

- Maintain (H,W,C) tensor format instead of transposing to (C,H,W)
- Add explicit float32 data type conversion for PyTorch tensors
- Implement comprehensive error handling with fallback values
- Fix OpenCV guided filter data type compatibility issues

Ensures GrabCut nodes output tensors in ComfyUI's expected format:
(batch, height, width, channels) for images and (batch, height, width) for masks.
2025-08-21 20:46:17 +02:00

8 lines
486 B
Python

from .nodes import NODE_CLASS_MAPPINGS as NODES_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS as NODES_DISPLAY_MAPPINGS
from .grabcut_nodes import NODE_CLASS_MAPPINGS as GRABCUT_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS as GRABCUT_DISPLAY_MAPPINGS
# Combine node mappings from both modules
NODE_CLASS_MAPPINGS = {**NODES_MAPPINGS, **GRABCUT_MAPPINGS}
NODE_DISPLAY_NAME_MAPPINGS = {**NODES_DISPLAY_MAPPINGS, **GRABCUT_DISPLAY_MAPPINGS}
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']