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>