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
fa7e9b7f20
fix: GrabCutRefinement mask unsqueeze, batch fallbacks, FFT div-by-zero, dead field removal
...
- Move mask.unsqueeze(0) outside else branch in GrabCutRefinement.refine_mask
(same bug pattern fixed in AutoGrabCutRemover, line 841)
- Replace bare `continue` in batch validation loop with fallback tensor append
to prevent torch.stack crash on empty list and bbox_metadata misalignment
- Derive exception-handler fallback h,w from input tensor instead of first
processed item to avoid shape mismatch across batch items
- Guard FFT peak_ratio division against zero mean on uniform images
- Remove dead edge_threshold field from GrabCutParams (never passed from nodes)
- Log warning when Pydantic validation is unavailable instead of silent skip
2026-03-29 08:08:22 +02:00
limbicnation
77b189a05a
fix: resolve code review issues — BBOX_TENSOR type, validation params, cache safety, dead write removal
...
- RETURN_TYPES: "FLOAT" → "BBOX_TENSOR" for [B,6] metadata tensor (prevents scalar misinterpretation)
- Validation: remove hardcoded phantom params, pass actual scaling_method; fix field name to match Pydantic model
- YOLO cache: device-aware key ("model::device"), threading.Lock, CUDA-only torch.compile()
- Scaling validator: add "bicubic", case-insensitive normalization to match node uppercase values
- Remove dead rgba[:,:,3] write-back in GrabCutRefinement (only alpha used downstream)
- Add initial_mask.unsqueeze(0) for single-image 2D masks
- Remove unused Annotated import from validation.py
2026-03-29 07:13:02 +02:00
limbicnation
b557c6729e
feat: remaining H100 audit fixes — invert_mask, bbox_tensor [B,6], float edge_blur, tests/
...
Steps completed (per abstract-painting-kitten.md):
1. FIX edge_blur_amount float truncation: int→float in MaskParams + removed int() casts
2. Wire invert_mask: INPUT_TYPES, method signatures, Pydantic validation, alpha inversion
applied in both AutoGrabCutRemover and GrabCutRefinement success paths
3. Add [B,6] bbox_metadata tensor output to AutoGrabCutRemover RETURN_TYPES
4. nodes.py: @torch.no_grad() on remove_background + batch_remove_background;
all .float()→.to(dtype=torch.float32)
5. Structured tests/ suite: conftest.py, test_grabcut_processor.py,
test_grabcut_nodes.py, test_nodes.py, test_validation.py
Verification:
- 48/48 new tests pass
- 6/6 original test_grabcut.py tests pass
- 4/4 node import test pass
- 0 flake8 E9/F63/F7/F82 errors
- edge_blur_amount=1.7 correctly stores as float (not truncated to 1)
BREAKING: AutoGrabCutRemover RETURN_TYPES changed from 5→6 (bbox_tensor added)
2026-03-29 06:53:33 +02:00