Lens Flare
Lens flare without a $50 plugin or a single API call
- video
- video
Lens Flare is the effect that says "camera" to the audience before they've even registered it. A light source that's off-frame or just at the edge gets an anamorphic streak, a chain of ghost images, and the whole frame suddenly feels like it was shot rather than rendered. It's a finishing touch - the kind of thing you add at the very end, after color, when a shot just needs a little photographic life.
ComfyTV is the canvas-style app layer on ComfyUI where every operation is its own node. This is one of the VideoFX stages, and like its siblings it's procedural math on your GPU - no models, no plugins, no network.
How it works. The stage synthesizes a flare at a position you pick: a bright core plus ghosts (the offset, colored copies that trail toward the optical center) and a horizontal streak (the classic anamorphic smear). It composites that over your frame per-frame, at an intensity you control. Under the hood it's a deferred torch op in ComfyTV's FX chain, previewed live in the node body and rendered in a single pass when the chain bakes - so it's effectively free to iterate on.
The inputs that matter. The force_run_token, project_id and parent_output_id inputs are internal plumbing. The creative set:
pos_x/pos_y- where the flare sits, normalized 0–1. Default (0.75, 0.25) is the classic upper-right sun position.intensity- 0–3, default 0.8. Set to 0 and the node becomes a pass-through (it returns an identity spec), which is a nice way to A/B the effect by keyframing intensity across time.size- flare scale, 0.05–1.streak- 0–1. How pronounced the horizontal anamorphic smear is; 0 kills it for a "clean" round-ish flare.ghosts- 0–8, default 5. The number of trailing ghost images. More ghosts = more "camera optical" and more mess; 3–5 is the tasteful band.
The video input is your upstream clip (optional but effectively required - it composites over something); the output is a video that carries on down the FX chain.
Install. Install the pack once:
cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV
Restart ComfyUI (a real backend restart, not a browser refresh) and the stage appears under ComfyTV → VideoFX. ComfyUI Manager - search "ComfyTV" - works too. Zero Python dependencies (the pack's pyproject.toml dependency list is empty), and no model files to fetch. The one install gotcha: on ComfyUI Desktop or multi-install setups, clone into the running instance's absolute path from the startup log, or the node won't register.
Where people get burned. Placing the flare center-frame and cranking intensity to 3 - congratulations, you've blinded the viewer. Real flares come from light at or just past the frame edge; keep pos_x/pos_y near the borders and let the streak run across the frame, which reads far more cinematic. Second: ghosts at 8 gets genuinely busy on a bright clip; if the flare looks like noise, cut ghosts before you cut intensity. And don't forget the effect rides the FX chain - if you Run this stage in isolation and see nothing happen, it's not broken, it's waiting for the chain to bake (check the live preview in the node body to dial it in).
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| force_run_token | INT | 00–2147483647 | Internal — bumped on Run to invalidate ComfyUI's input cache. |
| project_id | STRING | Internal — populated by the projectStore on the frontend. | |
| parent_output_id | INT | 00–2147483647 | Internal — lineage parent set by spawn handlers on the frontend. |
| pos_x | FLOAT | 0.750–1 | — |
| pos_y | FLOAT | 0.250–1 | — |
| intensity | FLOAT | 0.800–3 | — |
| size | FLOAT | 0.250.05–1 | — |
| streak | FLOAT | 0.500–1 | — |
| ghosts | INT | 50–8 | — |
| videoopt | COMFYTV_VIDEO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video | COMFYTV_VIDEO | — |