OpenCV stylization_1
Stylization, twin edition — painterly, deterministic, same node
- src
- dst
- nparray
stylization_1 is the duplicate twin of stylization_0 - same generated wrapper, same cv2.stylization call, same inputs, same output. This pack auto-generates a node per OpenCV overload and ships the duplicates, so the _0/_1 suffix is a coin flip, not a setting. Use either. What you're getting is one of the more fun deterministic effects in the whole pack.
It's OpenCV's edge-aware stylization filter - the painterly "oil paint" / watercolor look from photo apps. No model, no sampling, no seed: run it and you get the same smoothed, brushy result every time. That reproducibility is the appeal, especially after a session of re-rolling seeds trying to get lucky with a painted style. It's deterministic pixel math, and it does exactly what it promises.
The mechanism is a bilateral filter to flatten large regions plus a difference-of-Gaussians boost to darken edges, and the two inputs are the two knobs. sigma_s (spatial sigma) is your brush size - bigger means larger flattened areas and a more painted look. sigma_r (range sigma) decides how different two colors must be before the filter stops merging them - lower keeps finer edges, higher lets everything smear together. OpenCV's examples sit around sigma_s=60, sigma_r=0.4 for a strong effect; tune from there. On the downside it's a genuine filter and it's not fast on big images - drop the resolution if it crawls, and don't expect it to fix a broken input, only to repaint it.
Inputs and output. src (NPARRAY), sigma_s (FLOAT), sigma_r (FLOAT), optional dst (leave it). Output is a single nparray. This comes from the photo module, so the contrib wheel is required - opencv-contrib-python. The classic Cannot import name 'guidedFilter' from 'cv2.ximgproc' startup error means two conflicting OpenCV packages; resolve that before anything else runs.
Install. ComfyUI Manager → search "opencv-comfyui", or:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
restart. And keep the pack contract straight: NPARRAY is BGR uint8 0–255 numpy, not ComfyUI IMAGE. Image2Nparray in (batch_size 1 only), Nparrays2Image out. Get that chain and you can use any of the pack's 630+ nodes without re-learning the basics.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY | — | |
| sigma_s | FLOAT | — | |
| sigma_r | FLOAT | — | |
| dstopt | NPARRAY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |