2 Commits
Author SHA1 Message Date
limbicnation faab680db5 chore: lint cleanup and artifact removal
- Remove unused imports (ruff F401)
- Fix f-strings without placeholders (ruff F541)
- Resolve E402 import ordering in grabcut_nodes.py
- Fix B108 hardcoded /tmp fallback in nodes.py (use tempfile.gettempdir())
- Delete untracked artifacts: .claude/, node.zip, __pycache__/
- Add .claude/ and *.zip to .gitignore
2026-04-22 04:57:18 +02:00
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