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>
29 lines
766 B
Python
29 lines
766 B
Python
"""
|
||
ComfyUI DCT Custom Node Pack
|
||
=============================
|
||
• DCT2D – 2-D DCT transform (IMAGE → DCT_SPECTRUM + preview)
|
||
• DCTMask – frequency mask editor with built-in paint canvas
|
||
• IDCT2D – inverse DCT (DCT_SPECTRUM → IMAGE)
|
||
|
||
Install: place this folder inside ComfyUI/custom_nodes/
|
||
Deps: pip install scipy
|
||
"""
|
||
|
||
from .nodes import DCT2DNode, DCTMaskNode, IDCT2DNode
|
||
|
||
NODE_CLASS_MAPPINGS = {
|
||
"DCT2D": DCT2DNode,
|
||
"DCTMask": DCTMaskNode,
|
||
"IDCT2D": IDCT2DNode,
|
||
}
|
||
|
||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||
"DCT2D": "DCT 2D Transform",
|
||
"DCTMask": "DCT Spectrum Mask Editor",
|
||
"IDCT2D": "Inverse DCT 2D",
|
||
}
|
||
|
||
WEB_DIRECTORY = "./web"
|
||
|
||
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
|