Nodes/opencv-comfyui/OpenCV idct_1
ComfyUI Node

OpenCV idct_1

The duplicate inverse-DCT node — same transform, same dragons

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV idct_1
  • src
  • dst
  • nparray
flags

idct_1 is the twin of idct_0 - same src + flags inputs, same nparray output, same cv2.idct call. The opencv-comfyui generator emitted a node per overload and left the duplicates in, so _0 and _1 are interchangeable. Everything in the idct_0 article holds here; use whichever one ComfyUI shows you.

What it does (briefly)

The inverse Discrete Cosine Transform: it converts DCT coefficient arrays back into images. It's the "back" half of frequency-domain processing - the forward dct_0 takes your image to coefficients, something in the middle does filtering or compression math, and this node renders the result.

Inputs: src (NPARRAY - a float32 DCT coefficient array, not a plain image), flags (INT - 0 for the standard 2D inverse DCT, 4/DCT_ROWS for row-wise 1D), and an optional dst out-parameter you can leave disconnected.

Realistic use

Frequency-domain work - compression experiments, high-frequency denoising, watermark forensics - is niche inside ComfyUI. Most people never need the DCT at all. If you're here because a workflow used idct_1, the important things are: pair it with dct_0, keep your arrays in float32, and don't expect an un-transformed image to come back out looking like anything sensible. Garbage coefficients in, noise-looking array out.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui

or "OpenCV" via ComfyUI Manager, plus pip install opencv-contrib-python. No model files.

Bottom line

_0 vs _1 is a non-issue - same function. The actual learning curve is understanding the DCT itself. If that's why you're here, the idct_0 article walks through the full forward/inverse flow.

Categoryimage/OpenCV

Inputs (3)

NameTypeDefaultDescription
srcNPARRAY
flagsINT
dstoptNPARRAY

Outputs (1)

NameTypeDescription
nparrayNPARRAY