Nodes/Photography Nodes/Chromatic Aberration
ComfyUI Node

Chromatic Aberration

Color fringing that looks like a real lens, not a glitch effect

By TrophiHunter·Created about a year ago·Updated about a year ago· 5
Chromatic Aberration
  • image
  • IMAGE
strength0.200
methodpincushion
distort_channel_1red
distort_channel_2green
distort_channel_3blue
distort_channel_1_strength0.000
distort_channel_2_strength0.000
distort_channel_3_strength0.500
cropfalse

Chromatic aberration is the red/blue color fringing you see at the edges of cheap lens shots. AI generators rarely bake it in convincingly, and when they do it's usually as an ugly full-image smear. This node's take is different: it lets you split and distort the RGB channels independently with actual geometric distortion methods, so you can put the fringing exactly where a real lens would put it - at the edges and corners - instead of dragging a rainbow over the whole frame. That's the difference between "looks like a glitch" and "looks like it was shot on an actual lens," which is exactly the kind of tell the photorealism crowd hunts for.

How it works

Four methods, in two families:

  • basic / advanced - fixed, preset channel separations. Set-and-forget; basic is the safe minimal fringe, advanced pushes it further
  • barrel / pincushion - geometrically distort each channel's mapping outward (barrel) or inward (pincushion). These are the customizable ones: you pick which channel maps to what via distort_channel_1/2/3 (red/green/blue) and set each channel's displacement with distort_channel_1/2/3_strength (-1 to +1)

strength is the master amount, and crop handles the edges - distortion leaves empty border areas, and cropping hides them (that's also why real lenses vignette where they fringe).

Inputs that matter

  • method - "pincushion" is the default and a good starting point; "basic" is the least fiddly
  • strength - master intensity, default 0.2. Keep it low; fringing is a spice
  • distort_channel_N / distort_channel_N_strength - the per-channel control. The defaults have blue pushed (0.5) with red and green at 0, which gives that classic blue-on-the-edge look; swap to push red for a different character
  • crop - turn on if you get empty black crescents at the borders

One IMAGE in, one IMAGE out.

Install

Ships in Photography Nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/TrophiHunter/ComfyUI_Photography_Nodes

Restart and grab it under TrophiHunter/Photography (ComfyUI Manager: "Photography Nodes"). Pure torch/PIL/numpy, no extra deps.

Where people get burned

The failure mode is overdoing it - at strength above ~0.4 with all three channels pushed, the edges look like a broken projector bulb, not a lens. If that's the vibe, fine, but for realism keep the fringe confined to the frame edges (that's what the geometric methods give you) and leave the center clean. And if you're stacking effects, put CA late but before final sharpening - sharpening loves to amplify color fringing into hard purple lines. The author's example chain runs Lens Distortion → Chromatic Aberration → Noise → Sensor Dust, which mirrors how a real capture degrades: geometry first, then color error, then grain.

CategoryTrophiHunter/Photography

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
strengthFLOAT0.2000–1
methodCOMBOpincushion4 options: basic, advanced, barrel, pincushion
distort_channel_1COMBOred3 options: red, green, blue
distort_channel_2COMBOgreen3 options: red, green, blue
distort_channel_3COMBOblue3 options: red, green, blue
distort_channel_1_strengthFLOAT0.000-1–1
distort_channel_2_strengthFLOAT0.000-1–1
distort_channel_3_strengthFLOAT0.500-1–1
cropBOOLEANfalse

Outputs (1)

NameTypeDescription
IMAGEIMAGE