Nodes/ComfyUI XWAVE Nodes/XWAVE Chromatic Aberration
ComfyUI Node

XWAVE Chromatic Aberration

Add the lens fringe your AI image is missing

By XWAVEart·Created about a year ago·Updated about a year ago· 2
XWAVE Chromatic Aberration
  • image
  • IMAGE
intensity5.0
pattern
red_shift_x0.0
red_shift_y0.0
blue_shift_x0.0
blue_shift_y0.0
center_x0.50
center_y0.50
falloff
edge_enhancement0.00
color_boost1.00
seed0

Chromatic aberration is that red-blue fringing you get on cheap lenses and at the edges of old film scans - and here's the thing: diffusion models almost never generate it on their own. The community lore in the realism guides is that real lenses produce color fringing, and adding it in post is one of the cheap tricks that makes a render read as "captured" instead of "generated." XWAVE Chromatic Aberration is the most capable way to add it in this pack, with way more control than the simpler RGB Channel Shift node.

How it works

The node splits your image into red, green and blue, then displaces the red channel outward and the blue channel inward relative to a center point, before recombining. pattern picks the displacement shape:

  • radial - classic lens fringe that grows with distance from center. The realistic one.
  • linear - a prism-like one-directional split.
  • barrel - curved, barrel-distortion-style separation.
  • custom - driven entirely by your manual red_shift_x/y and blue_shift_x/y values.

falloff (linear, quadratic, cubic) controls how quickly the effect dies off with distance - quadratic is the most lens-like. center_x/center_y (0–1, default 0.5) move the optical center of the effect.

Inputs that matter

  • intensity (0–50) - overall strength. For believable lens fringe you want single digits; crank it for glitch art.
  • pattern - see above.
  • red_shift_x/y, blue_shift_x/y - manual per-channel displacement. These stack on top of the pattern-based movement, so they're your fine-tune and your custom pattern's primary controls.
  • center_x/center_y - where the effect pivots.
  • falloff - how the effect fades with distance.
  • edge_enhancement (0–1) - adds contrast to edges, which makes the fringe pop. Needs scipy; if it's missing the node skips it gracefully.
  • color_boost (0.5–2) - saturation multiplier. Strong aberration washes color out; this pulls it back.
  • seed - for pattern variation.

Output is a single IMAGE, straight into Preview/Save.

Getting a result that doesn't look broken

Start with pattern = radial, falloff = quadratic, intensity around 3–6, and leave the manual shifts at zero. That's your "shot on a 50mm with a loose mount" look. Small tweaks to center_x/y make the effect asymmetrical like a real off-center lens. If you go big - 25+ - you're in VHS corruption territory, which is fine if that's the brief.

Installing it

It's part of ComfyUI XWAVE Nodes. ComfyUI Manager → search "XWAVE" → install ComfyUI XWAVE Nodes, restart. Manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/XWAVEart/comfyui-xwave-xlitch-nodes
cd comfyui-xwave-xlitch-nodes
pip install -r requirements.txt

Only Pillow, numpy, scipy - no models, no keys, pure CPU. If the pack's already installed from another XWAVE node, you're done; it's all one install.

Gotchas

  • The manual shifts stack with the pattern. Set pattern = radial and then push red_shift_x and you'll get both effects at once. If you want purely manual control, switch to custom.
  • intensity is steep. The 0–50 range makes 5 look like a lot already. Ignore the upper half until you're deliberately corrupting.
  • It's batch-unfriendly at the extreme end. Each frame is processed separately in Python; high intensity on a big video batch will make you wait.

The pack as a whole is new with no community chatter behind it yet, so there's no battle-tested settings wiki - but this node's defaults are sensible enough that you can find the look by feel. For a realism finish, subtle is the whole game: barely-there fringe reads as photography, obvious fringe reads as glitch.

CategoryXWAVE/Color

Inputs (13)

NameTypeDefaultDescription
imageIMAGE
intensityFLOAT5.00–50
patternCOMBO4 options: radial, linear, barrel, custom
red_shift_xFLOAT0.0-20–20
red_shift_yFLOAT0.0-20–20
blue_shift_xFLOAT0.0-20–20
blue_shift_yFLOAT0.0-20–20
center_xFLOAT0.500–1
center_yFLOAT0.500–1
falloffCOMBO3 options: linear, quadratic, cubic
edge_enhancementFLOAT0.000–1
color_boostFLOAT1.000.5–2
seedINT00–4294967295

Outputs (1)

NameTypeDescription
IMAGEIMAGE