Problems fixed:
- JS was in web/js/ causing ../../scripts/app.js to resolve incorrectly;
moved to web/dct_nodes.js so the relative import path is correct.
- Replaced the broken inline LiteGraph canvas widget with a button widget
("Edit Mask") that opens a full-screen modal editor – matching the
experience of ComfyUI's built-in LoadImage mask editor.
- DCT spectrum preview was nearly black due to dominant DC component;
switched to 99th-percentile normalisation so all frequency bands are
visible as the modal canvas background.
Modal controls:
LMB drag : paint black (zero those DCT frequencies)
RMB drag : paint white (restore frequencies)
Scroll : brush size
Clear All : reset to white
Invert : invert mask
Apply : save to node and close
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three nodes for 2-D DCT frequency-domain filtering:
- DCT2D: IMAGE → DCT_SPECTRUM + log-scale spectrum preview
- DCTMask: interactive paint-canvas mask editor on the spectrum
- IDCT2D: DCT_SPECTRUM → reconstructed IMAGE
The mask editor embeds a LiteGraph canvas widget that lets users
paint black (remove) or white (restore) frequency regions directly
inside the ComfyUI graph.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>