Nodes/ComfyUI LC123 Nodes/LC Chromatic Aberration
ComfyUI Node

LC Chromatic Aberration

Add the lens fringe that kills the 'AI look'

By lonecatone23·Created 2 months ago·Updated 3 days ago· 18
LC Chromatic Aberration
  • image
  • image
red_shift-3
red_directionhorizontal
green_shift-2
green_directionhorizontal
blue_shift-7
blue_directionhorizontal

AI output is too clean. Real photos have flaws - grain, vignetting, motion blur, and the red-and-blue fringing around high-contrast edges that every cheap lens produces. That chromatic aberration is a known anti-"AI look" move, the kind of thing compositors reach for to make a render read as captured. LC Chromatic Aberration is the pack's version: it shifts the red, green, and blue channels by different pixel amounts, which is precisely the mechanism behind lens fringing, and it gives you per-channel control over both the shift and the direction.

The source is transparent about the trick: each channel gets torch.rolled - the red channel shifted by red_shift pixels, green by green_shift, blue by blue_shift, each along a horizontal or vertical axis - then the channels are stacked back together. Roll means the shifted pixels wrap around to the opposite edge, which is the standard cheap way to do this and looks right in practice for small shifts. Defaults are red −3, green −2, blue −7, all horizontal - a subtle, classic magenta/cyan split at the edges. If all three shifts are 0, the node is a pass-through.

The controls are six and no more: three shift amounts (each an integer, −20 to 20, in pixels) and three directions. The sign of the shift matters for which edge gets which color - negative horizontal shifts push a channel left, so opposite edges get opposite fringe colors, which is exactly how a real lens behaves. If you want the fringe reversed (cyan on the left instead of magenta), flip the sign.

For subtle realism work, the defaults are genuinely close to right: single-digit pixel shifts on a typical render, horizontal only, and the result is a hair of color at high-contrast edges that most people won't consciously register but will file under "looks shot on a real lens." That's the intended use. The over-the-top version - big shifts like 15–20 pixels - reads as a glitch or RGB-split effect, which is a legitimate aesthetic in its own right, just not "photorealism."

The lens-perspective detail worth knowing: real chromatic aberration gets stronger toward the image corners, but this node applies a uniform shift across the whole frame. It's a flat approximation, not a lens-simulation - the pack has a separate LC Lens Profile node for proper lens-corner behavior if you want the realistic falloff. For the "cheap single node" fix, this is it, and it composes well with the other post moves (grain, vignette) that the community bundles together when de-AI-ing a frame.

It's an output node with a single image out and the pack's on-node preview with the before/after hover wipe, so you can flick between clean and fringed before committing. Keep the shifts small, check the wipe, and you'll get realism without the glitch.

Install is the standard LC123 clone:

cd ComfyUI/custom_nodes
git clone https://github.com/lonecatone23/ComfyUI_LC123_nodes

Restart, no pip deps. Defaults in, tiny tweak on the blue shift, and your renders suddenly have an edge that doesn't look generated.

CategoryLC123/image

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
red_shiftINT-3-20–20Red channel shift in pixels.
red_directionCOMBOhorizontalRed shift axis.
green_shiftINT-2-20–20Green channel shift in pixels.
green_directionCOMBOhorizontalGreen shift axis.
blue_shiftINT-7-20–20Blue channel shift in pixels.
blue_directionCOMBOhorizontalBlue shift axis.

Outputs (1)

NameTypeDescription
imageIMAGE