Eses Image Lens Effects
Caution
Before downloading and using the contents of this repository, please review the LICENSE.txt and the disclaimer. I kindly ask that you respect the licensing terms and the effort put into these tools to ensure their continued availability for everyone. Thank you!
Description
The 'Eses Image Lens Effects' node is a multipurpose node for ComfyUI designed to simulate a variety of lens characteristics. It combines several typical effects into a single, convenient node, allowing to add realistic or stylistic lens distortion, chromatic aberration, post-process scaling, and a highly configurable vignette.
💡 This node uses scikit-image and PyTorch for its calculations.
💡 If you are looking for a node that does many lens effects in one node, then why not give this one a try!
Features
-
Lens Distortion & Chromatic Aberration:
- A
k1_master_distortioncontrol sets the primary barrel (bulge) or pincushion (squeeze) distortion for the entire image. - Channel-specific
aberrationspinners for Red, Green, and Blue act as offsets to the master distortion, creating controllable color fringing. - A global
radial_exponentparameter fine-tunes the distortion's profile, controlling how quickly the effect ramps up from the image center outwards.
- A
-
Post-Process Scaling:
- A
post_process_scaleslider allows for quick, centered zooming of the image. - This is suitable for cleanly cropping out the black areas or stretched pixels revealed at the edges by the lens distortion effect.
- A
-
Flexible Vignette:
- A flexible vignette effect applied as the final step.
vignette_amount: Controls the intensity for both darkening (positive values) and lightening (negative values).vignette_size: Adjusts the radius of the vignette, allowing it to cover more of the image or shrink into the corners.vignette_falloff: Controls the hardness of the vignette's gradient curve.fit_vignette_to_frame: A toggle to keep the vignette perfectly circular or stretch it to fit the image's aspect ratio.
-
Flexible Edge Handling & Quality:
interpolation_modefor selecting resampling quality (e.g., Bilinear, Bicubic).fill_modeto define how new pixels are handled at the boundaries.
Installation
-
Navigate to your ComfyUI custom nodes directory:
ComfyUI/custom_nodes/ -
Clone this repository (or place files manually):
git clone https://github.com/quasiblob/ComfyUI-EsesImageLensEffects -
Install requirements (If needed):
- You likely already have
scikit-imageinstalled. If not, you can run the following command inside this node's directory:
pip install -r requirements.txt - You likely already have
-
Restart ComfyUI:
- After restarting, the "Eses Lens Effects" node will be available in the "Eses Nodes/Image Adjustments" category.
Folder Structure
ComfyUI-EsesImageLensEffects/
├── __init__.py # ComfyUI node definition.
├── image_lens_effects.py # The Python file containing the node logic.
├── README.md # This file.
├── LICENSE.txt # You should read this before using this node.
├── docs/
└── examples/ # Node screenshots.
Usage
The node is designed to be used in a logical order:
- Connect your image to the 'image' input.
- Adjust the Distortion & Aberration parameters to achieve the desired lens warp and color fringing.
- Use the
post_process_scaleslider to zoom in and re-frame the image, hiding any unwanted edges created by the distortion. - Finally, apply a stylistic Vignette using its dedicated controls.
- Set the general
interpolation_modeandfill_modeto control quality and edge handling.
Category
Eses Nodes/Image Adjustments
Contributing
- Feel free to report bugs and improvement ideas in issues, but I may not have time to do anything.
License
- See LICENSE.txt
Update History
-
2025.7.10 Version 1.0.1: minor updates to documentation
-
2025.6.27 Version 1.0.0: initial release
⚠️Disclaimer⚠️
This custom node for ComfyUI is provided "as is," without warranty of any kind, express or implied. By using this node, you agree that you are solely responsible for any outcomes or issues that may arise. Use at your own risk.
Acknowledgements
Thanks to the ComfyUI team and community for their ongoing work!
