Nodes/DJZ-Nodes/Panavision Lens Effect V2
ComfyUI Node

Panavision Lens Effect V2

The closest ComfyUI gets to renting anamorphic glass

By MushroomFleet·Created 2 years ago·Updated 5 months ago· 78
Panavision Lens Effect V2
  • images
  • IMAGE
aspect_ratio2.39
anamorphic_squeeze2.0
bokeh_intensity0.50
bokeh_threshold0.80
bokeh_elongation2.0
bokeh_rotation0
primary_flare_intensity0.40
secondary_flare_intensity0.20
flare_position_y0.0
flare_stretch1.0
highlight_retention0.80
shadow_rolloff0.30
blacks_crush0.10
highlight_warmth0.20
midtone_warmth0.10
shadow_coolness0.15
chromatic_aberration0.00
barrel_distortion0.00

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:

  1. Anamorphic squeeze - anamorphic_squeeze (1–2.4) desqueezes the frame width before processing, which is how the anamorphic "de-squeeze" look is simulated.
  2. Lens distortion - barrel_distortion (warp in/out) and chromatic_aberration (channel splitting) applied via a remapped grid.
  3. Bokeh - apply_advanced_bokeh blurs highlights into elongated ovals. bokeh_intensity is the amount, bokeh_threshold picks which bright pixels become bokeh, bokeh_elongation makes them anamorphic, and bokeh_rotation tilts them.
  4. Flare system - a multi-layer thing: a warm primary flare and cooler secondary ones, with primary_flare_intensity, secondary_flare_intensity, flare_position_y, and flare_stretch controlling placement and smear.
  5. Color science - highlight_retention, shadow_rolloff, blacks_crush, then the temperature trinity (highlight_warmth, midtone_warmth, shadow_coolness).
  6. 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.

Categoryimage/effects

Inputs (19)

NameTypeDefaultDescription
imagesIMAGE
aspect_ratioFLOAT2.391.85–2.76
anamorphic_squeezeFLOAT2.01–2.4
bokeh_intensityFLOAT0.500–1
bokeh_thresholdFLOAT0.800.5–1
bokeh_elongationFLOAT2.01–3
bokeh_rotationFLOAT0-45–45
primary_flare_intensityFLOAT0.400–1
secondary_flare_intensityFLOAT0.200–1
flare_position_yFLOAT0.0-1–1
flare_stretchFLOAT1.00.5–2
highlight_retentionFLOAT0.800–1
shadow_rolloffFLOAT0.300–1
blacks_crushFLOAT0.100–0.5
highlight_warmthFLOAT0.20-0.5–0.5
midtone_warmthFLOAT0.10-0.5–0.5
shadow_coolnessFLOAT0.15-0.5–0.5
chromatic_aberrationFLOAT0.000–1
barrel_distortionFLOAT0.00-0.5–0.5

Outputs (1)

NameTypeDescription
IMAGEIMAGE