Nodes/MKRShift_Nodes/Edge Aberration
ComfyUI Node

Edge Aberration

Chromatic aberration that knows where edges are

By criskb·Created 7 months ago·Updated 5 months ago· 0
Edge Aberration
  • image
  • mask
  • image
  • mask
  • edge_aberration_info
settings_json{"strength_px":2.4,"edge_threshold":0.1,"edge_softness":0.18,"radial_bias":0.65,"green_shift":0.0,"falloff":0.65,"mix":1.0,"mask_feather":4.0,"invert_mask":false}

Real photos have chromatic aberration. AI images almost never do, because the model was trained on clean renders and well-corrected glass - which is exactly why adding a little back is one of the cheapest "make it look shot on a lens" moves in the book. x1EdgeAberration applies that fringe to your image the way a lens actually does it: at the edges of objects, and stronger toward the frame corners.

It's part of MKRShift Nodes by Cris K B, under MKRShift Nodes/VFX/Distortion.

How it works

Most chromatic-aberration filters make a dumb choice: they offset the R and B channels by a fixed amount across the whole image, which fringes everything, including clean flat areas. This node finds edges first. It computes an edge map from the image (edge_threshold sets how much contrast counts as an edge, edge_softness feathers it), then shifts the red and blue channels against green only along those edges, by strength_px pixels. Result: magenta/green fringing where real lenses produce it - on the borders of subjects - and untouched flat regions.

The other half is radial_bias and falloff, which push the shift outward from center. That's the difference between looking like a bug and looking like a lens: real chromatic aberration is weakest at the optical center and worst in the corners. green_shift is a fine-tune that offsets green separately, and mix blends the whole pass in, so you can back off to a whisper.

The inputs that matter

Inside the settings_json:

  • strength_px - the shift amount in pixels (default 2.4). Half a pixel to 2px is the realistic zone.
  • edge_threshold / edge_softness - how aggressive edge detection is, and how feathered the fringe is.
  • radial_bias / falloff - how strongly the effect weights toward frame corners.
  • green_shift - extra independent green offset if you want that rare green-magenta split beyond the default.

Optional mask input with mask_feather / invert_mask, plus outputs image, mask, and an edge_aberration_info string.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

Restart, or grab it via ComfyUI Manager by searching MKRShift_Nodes. No requirements, no models, no keys.

The trap

Subtlety is the entire game. The photorealism playbook is "red channel aberration" as a finishing touch measured in pixels at most - the moment the fringe reads as a visible colored outline, you've gone from "shot on glass" to "Photoshop filter." Start at strength_px 1.0–1.5, keep radial_bias high (0.6–0.8) so it concentrates in corners, and trust mix at 0.6–1.0. It's a tiny node with one real job, but it's the kind of detail that separates "AI image with aberration added" from "image that looks like it had a lens in front of it."

CategoryMKRShift Nodes/VFX/Distortion

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
settings_jsonSTRING{"strength_px":2.4,"edge_threshold":0.1,"edge_softness":0.18,"radial_bias":0.65,"green_shift":0.0,"falloff":0.65,"mix":1.0,"mask_feather":4.0,"invert_mask":false}
maskoptMASK

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
edge_aberration_infoSTRING