Nodes/opencv-comfyui/OpenCV detailEnhance_1
ComfyUI Node

OpenCV detailEnhance_1

The twin of detailEnhance_0 — and it's identical

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV detailEnhance_1
  • src
  • dst
  • nparray
sigma_s
sigma_r

Quick version: detailEnhance_1 is the exact same node as detailEnhance_0. Same inputs, same output, same cv2.detailEnhance call underneath. There is no behavioral difference between them, and this is a general quirk of the whole opencv-comfyui pack you should understand once so it stops confusing you.

The pack auto-generates a node for every overload of every top-level OpenCV function it can parse. cv2.detailEnhance is declared twice in the OpenCV Python stubs - once for MatLike inputs and once for UMat (OpenCV's GPU/OpenCL buffer type). The generator numbers them _0 and _1. But on the ComfyUI side, both overloads collapse into the same NPARRAY type, so the two nodes are byte-for-byte identical. You'll see this pattern all over the pack: dilate_0/_1, dft_0/_1, divide_0/1/2/3. It's duplication caused by the generator, not two different features hiding behind a suffix. Grab whichever, don't lose sleep.

So everything worth saying about the mechanics lives on the _0 page. The one-sentence version: it's OpenCV's edge-preserving detail enhancement - smooth with a domain transform, isolate the high-frequency detail, amplify it, add it back. You get texture pop (skin grain, fabric, surface detail) without the halos a plain sharpen produces, because the smoothing respects color edges. It's a deterministic millisecond operation in the post-processing layer, not a re-render.

Inputs: src (NPARRAY - convert from Comfy IMAGE with the pack's Image2Nparray first), sigma_s (spatial smoothing, 0–200), sigma_r (edge sensitivity, 0–1). Start around sigma_s=10–30, sigma_r=0.1–0.2 and watch for waxy output past ~60. Skip the optional dst out-parameter - the result comes back on the nparray output anyway, and the README tells you to avoid out-params in this pack.

Output: a single nparray, which you feed into Nparrays2Image to get back a Comfy IMAGE. Remember the batch-size rule: this pack only handles one image at a time, so ImageFromBatch (length=1) is your friend if a batch of 2+ shows up.

Installing: it's in geroldmeisinger/opencv-comfyui - ComfyUI Manager → search "OpenCV", or:

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

then restart. Requires opencv-contrib-python (plus numpy/torch); the classic pack-wide failure is Cannot import name 'guidedFilter' from 'cv2.ximgproc' from conflicting OpenCV wheels - fix that and the whole pack starts loading.

Bottom line: if you've already got detailEnhance_0 in your workflow, this node adds nothing. Pick one, run it, move on.

Categoryimage/OpenCV

Inputs (4)

NameTypeDefaultDescription
srcNPARRAY
sigma_sFLOAT
sigma_rFLOAT
dstoptNPARRAY

Outputs (1)

NameTypeDescription
nparrayNPARRAY