Panavision Lens Effect V2
The closest ComfyUI gets to renting anamorphic glass
- images
- IMAGE
PanavisionLensV2 is the heavy-duty one in DJZ-Nodes' cinematic lineup - a full anamorphic lens simulation that stacks bokeh, lens flares, color grading, and distortion onto your images in one pass. Where LensLeaks is a quick wash of light and NonSquarePixels is a subtle format quirk, this is the "make it look like it was shot on a $50k cinema lens" node, and it's the closest thing in the pack to a one-stop film emulation.
Reality check before you get excited: it's a strong look, not a physics simulation. It models the signature anamorphic traits - elongated oval bokeh, horizontal flare streaks, slight barrel distortion, a specific color grade - but it's procedural OpenCV/PyTorch work, so treat it as a stylist, not a lens. If that's the vibe you want, it does it properly.
How it works
The pipeline runs in a fixed order, and knowing it helps you debug:
- Anamorphic squeeze -
anamorphic_squeeze(1–2.4) desqueezes the frame width before processing, which is how the anamorphic "de-squeeze" look is simulated. - Lens distortion -
barrel_distortion(warp in/out) andchromatic_aberration(channel splitting) applied via a remapped grid. - Bokeh -
apply_advanced_bokehblurs highlights into elongated ovals.bokeh_intensityis the amount,bokeh_thresholdpicks which bright pixels become bokeh,bokeh_elongationmakes them anamorphic, andbokeh_rotationtilts them. - Flare system - a multi-layer thing: a warm primary flare and cooler secondary ones, with
primary_flare_intensity,secondary_flare_intensity,flare_position_y, andflare_stretchcontrolling placement and smear. - Color science -
highlight_retention,shadow_rolloff,blacks_crush, then the temperature trinity (highlight_warmth,midtone_warmth,shadow_coolness). - Aspect ratio - finally the image is resized so its width matches
aspect_ratio× height (1.85 to 2.76, default 2.39).
The inputs that matter
That's eighteen inputs, so here's the short list a beginner actually touches:
- aspect_ratio - your target cinematic ratio. 2.39 is anamorphic widescreen, 1.85 is flat widescreen. This resizes, not crops, so feed it images whose aspect is close or you'll get distortion.
- anamorphic_squeeze - how aggressively it simulates the desqueeze. Leave at 2.0 to start.
- bokeh_intensity / bokeh_threshold - the amount of bokeh and what counts as a highlight. High threshold + low intensity = subtle.
- primary_flare_intensity - the visible horizontal streak. 0.4 is tasteful; past 0.7 it's a light show.
Everything else - the warmth sliders, the rolloff, the distortion - is the color-grade half. They're all 0–1 (or ±0.5) and safe to nudge one at a time.
Output: a single IMAGE, same batch, ready for VHS treatment, a Save node, or a film-grain pass.
Installing it
Part of DJZ-Nodes. ComfyUI Manager → Install Custom Nodes → search DJZ-Nodes → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/DJZ-Nodes
cd DJZ-Nodes
pip install -r requirements.txt
This one runs on PyTorch operations (it uses F.interpolate and convolution), so no OpenCV dependency here - ComfyUI's own torch handles it. The pack's kitchen-sink requirements install a lot this node never uses.
Common issues
The #1 mistake is cranking everything at once - with all five effect families armed at max you get a blurry, flared, color-mangled mess that looks nothing like film. Build up: set the look with color and distortion first, then add bokeh, then flares. Second gotcha: the final aspect-ratio step resizes rather than crops, so feeding a very different aspect ratio than your aspect_ratio target visibly squashes the frame - match the source roughly, or expect warping. And bokeh_threshold near 1.0 means almost nothing qualifies as a highlight, so if you set it high and see no bokeh, that's the knob to pull back, not intensity. This is the node you keep for a "filmic" pass - just spend five minutes finding your preset, because it's a lot of knobs.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| aspect_ratio | FLOAT | 2.391.85–2.76 | — |
| anamorphic_squeeze | FLOAT | 2.01–2.4 | — |
| bokeh_intensity | FLOAT | 0.500–1 | — |
| bokeh_threshold | FLOAT | 0.800.5–1 | — |
| bokeh_elongation | FLOAT | 2.01–3 | — |
| bokeh_rotation | FLOAT | 0-45–45 | — |
| primary_flare_intensity | FLOAT | 0.400–1 | — |
| secondary_flare_intensity | FLOAT | 0.200–1 | — |
| flare_position_y | FLOAT | 0.0-1–1 | — |
| flare_stretch | FLOAT | 1.00.5–2 | — |
| highlight_retention | FLOAT | 0.800–1 | — |
| shadow_rolloff | FLOAT | 0.300–1 | — |
| blacks_crush | FLOAT | 0.100–0.5 | — |
| highlight_warmth | FLOAT | 0.20-0.5–0.5 | — |
| midtone_warmth | FLOAT | 0.10-0.5–0.5 | — |
| shadow_coolness | FLOAT | 0.15-0.5–0.5 | — |
| chromatic_aberration | FLOAT | 0.000–1 | — |
| barrel_distortion | FLOAT | 0.00-0.5–0.5 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |