ComfyUI Node

MX_Vignette

The corner-darkener that's secretly a grading blend

By Intersection98·Created 2 years ago·Updated 2 years ago· 13
MX_Vignette
  • images
  • IMAGE
  • MASK
lens_shape
lens_edge
lens_curvy3.0
lens_zoom0.0
brightness0.00
saturation0.50

Vignetting is the oldest trick in the film-grain-and-imperfections playbook: darken the corners a touch and the center pops, the frame feels intentional, and nobody can quite say why. MX_Vignette is this pack's take on it - and it's sneakily more flexible than a single "vignette strength" slider.

Here's the thing most people miss on first open: at the default settings this node doesn't darken anything. The whole effect is a blend between your original image and a brightness/saturation-adjusted copy, driven by a falloff mask that's strongest at the edges. brightness defaults to 0 (no change) and saturation to 0.5 (a 50% desaturate). So at defaults, you get slightly washed-out corners, not shadows. Pull brightness into negative territory - that's the actual vignette - and the corners go dark. It's a "darken what's at the edge" tool, not an auto-darkener, and that's exactly what makes it useful.

How it works

The node builds a radial distance field across your image: 0 at the center, 1 at the corners. That field becomes a mask, the image gets the brightness/saturation pass, and the two are composited so the edges show the adjusted copy while the center keeps the original. Because the mask is exposed as a second output, MX_Vignette doubles as a mask generator for other compositing nodes - darken selectively, blur the transition, feed it into a blend. The MASK output is white at the corners, black in the middle.

The controls shape that falloff rather than the color:

  • lens_shape (circle / rectangle) - a round optical falloff or a boxier one. For portraits, circle; for architectural or landscape shots, rectangle reads more natural.
  • lens_curvy (default 3.0, up to 15) - the exponent on the distance. Lower values give a slow, gentle gradient; higher values make a tight dark ring right at the edges. This is the "how much does it announce itself" dial.
  • lens_edge (around / symmetric) - this one matters on non-square images. around runs the falloff on your actual dimensions, so a 512×768 portrait gets an elliptical vignette. symmetric pads to a square, centers the falloff, and crops back - a true circular vignette on any aspect ratio.
  • brightness and saturation - what actually happens at the edges. Negative brightness = dark corners; saturation below 1 desaturates them. Classic film look is both: darker and a touch desaturated.
  • lens_zoom (default 0) - subtle scale on the mask. It's bumped +1 internally, and mostly shifts how far into the frame the falloff reaches. Leave it alone until you've twisted everything else.

The output is an IMAGE you can chain straight into a Save node or more grading steps.

Installing it

The pack is a one-liner, and this node carries no model files or heavy dependencies - just numpy, Pillow, torchvision, and OpenCV, which almost every ComfyUI install already has.

cd ComfyUI/custom_nodes
git clone https://github.com/Intersection98/ComfyUI_MX_post_processing-nodes
cd ComfyUI_MX_post_processing-nodes
pip install -r requirements.txt

Restart ComfyUI and it shows up under postprocessing/Effects. ComfyUI Manager can also find it - search "MX post processing" or "Intersection98" - and will handle the requirements.txt for you.

Where people get burned

  • The defaults aren't a vignette. As above: no darkening until brightness goes negative. Half the confusion about this node comes from people who dial one slider and expect corners.
  • The cv2 import. The pack's requirements list opencv-python, but if you've trimmed your environment and get a ModuleNotFoundError: No module named 'cv2' on startup, that's it - pip install opencv-python.
  • The folder name is weird. The repo dir is ComfyUI_MX_post_processing-nodes, with a stray hyphen. It's harmless, but if you ever poke at the Python path in a workflow, it's custom_nodes.ComfyUI_MX_post_processing-nodes.

This pack is part of the EllangoK/ComfyUI-post-processing-nodes lineage (the README credits it and a couple of other classic post packs), and in the wild it's the thing people bolt onto the end of a workflow as a finishing grade - cool the tone, kill some contrast, add grain. MX_Vignette is the piece that sells the look by framing the subject. It won't fix a bad image, but it'll make a good one feel finished.

Categorypostprocessing/Effects

Inputs (7)

NameTypeDefaultDescription
imagesIMAGE
lens_shapeCOMBO2 options: circle, rectangle
lens_edgeCOMBO2 options: around, symmetric
lens_curvyFLOAT3.0
lens_zoomFLOAT0.0
brightnessFLOAT0.00
saturationFLOAT0.50

Outputs (2)

NameTypeDescription
IMAGEIMAGE
MASKMASK