๐ผ> Lens Distortion
A quick fisheye/barrel warp, marked 'subject to change' by its own author
- image
- image
A small post-processing node that warps an image the way a real camera lens does - pushing straight lines into curves toward the edges of frame, the classic fisheye/barrel look, or the opposite pincushion pull. It's one of a handful of "make it look like it actually came out of a camera" nodes YANC ships alongside Film Grain and RGB Shift, in the same spirit as the wider community trend of adding deliberate lens/film imperfections to push AI output away from the too-clean default look.
Worth knowing going in: the README flags this one specifically as "subject to change," which the other post-processing nodes in the pack don't get called out as. Treat it as the least stable node in the collection - fine to use, just don't be surprised if its exact behavior shifts in a future update more than the rest.
How it works
It maps the image through a radial distortion function centered on the image, controlled by two parameters: how strong the warp is and how much the whole image is zoomed in first (partly to compensate for the way distortion pulls content toward or away from the edges).
The inputs and outputs that matter
distortion(default0, range โ0.25 to 2) - the warp strength.0is no distortion. Positive values push toward a barrel/fisheye bulge; negative values (down to โ0.25) pull the opposite way, toward pincushion.zoom(default1, range 0.1โ10) - scales the image before/alongside the distortion. Useful for cropping out the empty corners a strong barrel distortion can create, or for exaggerating the effect further.
One output: image, the warped result - typically the last or near-last step in a post-processing chain, since it changes geometry and you generally want other effects (grain, vignette, color grading) either baked in before or applied after depending on the look you're after.
How to install it
Via ComfyUI Manager: search "yanc" or "YANC - Yet Another Node Collection," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ALatentPlace/ComfyUI_yanc
then restart. No extra dependencies, no downloads.
Common issues & troubleshooting
Empty/transparent corners appear at higher distortion values. Barrel distortion pulls the image inward from the edges, which can leave gaps at the corners depending on strength. Compensate by increasing zoom a bit alongside distortion so the warped content still fills the frame, then crop if needed.
The effect looks too subtle or too extreme and there's no obvious "correct" value. There isn't one - unlike some of the pack's other post nodes (Film Grain, for instance, ties its defaults to a specific look), this one doesn't ship strong guidance in the README beyond the parameter ranges. Start small (0.05โ0.2) and compare against a reference photo shot on the lens you're trying to emulate; going straight to the top of the range reads as a special-effects fisheye rather than a subtle "cheap lens" imperfection.
Behavior changes after updating the pack. Given the author's own "subject to change" note, if you pin a specific look for a production workflow, consider pinning the pack's git commit rather than tracking main, so an update to this node specifically doesn't quietly shift your saved parameter values.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | โ | |
| distortion | FLOAT | 0.00-0.25โ2 | โ |
| zoom | FLOAT | 1.000.1โ10 | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | โ |