Adds a clickable Canvas2D preview widget to CryptomatteLayer that displays
the connected beauty pass, maps mouse clicks to pixel coordinates for matte
generation, and overlays a diagonal zebra stripe pattern on selected pixels.
- Add preview_image optional IMAGE input and OUTPUT_NODE for UI data
- Create js/cryptomatte.js with click handler, crosshair, and hover coords
- Fix image output to always produce valid [1,H,W,3] IMAGE tensors
- Search all cryptomatte ranks and ID channels for hash matching
- Extract layer name resolution into _resolve_layer_name method
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add optional x_coord/y_coord inputs for pixel selection
- Sample cryptomatte float32 hash at clicked position
- Generate binary mask matching all pixels with same object ID
- Add JS click handler to map preview clicks to pixel coordinates
- Existing functionality preserved when coords are -1 (default)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
P8: preserve original layer name in fuzzy-match debug logs
P9: preserve negative values in ACES colorspaces
P10: use actual channel count in reshape_from_processing
P11: add max version counter (9999) to get_unique_filepath
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
P3: normalize int32 PIL I-mode values by dtype max instead of raw passthrough
P4: clamp alpha to [0,1] instead of min-max stretching
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Step-by-step processing details were flooding the console during normal
ComfyUI operation. Demote ~45 info-level logs to debug, consolidate
multi-line error blocks, and remove redundant duplicate messages. Only
one clean summary line per major node operation remains at INFO level.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PIL's convert("RGB") silently truncates to 8-bit, destroying precision
for high bit depth TIFFs and PNGs. Bypass it for I;16/I/F modes by
reading directly into numpy and normalizing per detected bit depth.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add channels < 3 guard matching histogram pattern.
Replace all var declarations with const/let for consistency.
Add batch_size to image_info for parity with histogram node.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Wrap execute body in try/except with error logging
- Handle < 3 channel edge case by repeating channels
- Remove dead-code guard on bins assignment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Detect bit depth from original image mode before RGB conversion.
Fix double-normalization when normalize=True.
Preserve constant images instead of zeroing them.
Fix alpha mask tensor shape to match ComfyUI MASK type [B,H,W].
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use relative path for WEB_DIRECTORY.
Remove commented-out registration code from modules.
Replace bare except with specific exception types.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Swap incorrectly reversed eotf_sRGB/eotf_inverse_sRGB calls.
Fix operator precedence in conditional checks.
Move colorspace config to class-level constants.
Use BT.1886 transfer function for Rec.2020.
Clean up bare excepts and dead code.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Preserve full float range for EXR output instead of clipping to [0,1].
Let OIIO handle float16 conversion for half-float EXR.
Fix EXR bit_depth fallback from 16 to 32 (closes#10).
Use deterministic grayscale sampling.
Remove non-functional dynamic widget metadata.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace always-execute NaN returns with content-aware fingerprinting
based on tensor properties, node parameters, and sampled pixel values.
Remove unused workflow JSON.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>