Commit Graph
1 Commits
Author SHA1 Message Date
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