Tilt Shift
Turn your renders into a model-train set
- image
- ui_widget
- image
- image_list
Every so often someone posts an aerial photo of a city that looks like a meticulously built miniature - cars like toys, buildings like dollhouses. That's tilt-shift photography (or a convincing fake of it), and LF_TiltShift does the fake for you: it keeps a thin band of the image sharp and throws a heavy blur over everything else, which is exactly the cue that makes a scene read as "small." It's the miniature-ifier from the lf-nodes filter family, and it's a fun node - but it's also a genuinely useful attention-guiding tool once you stop thinking of it as a party trick.
How it works
It builds a distance map over the image - how far each pixel is from your chosen focus band - and converts that distance into a mask. Pixels inside the band are sharp; pixels outside get a Gaussian blur; the mask controls the blend between the two. Three details make or break the effect:
- focus_position (FLOAT, 0–1, default 0.5) - vertical center of the sharp band. 0 is the top of the frame, 1 is the bottom.
- focus_size (FLOAT, 0.05–0.9, default 0.25) - how tall the sharp zone is, as a fraction of the image.
- blur_radius (INT, 3–151, default 25) - the Gaussian radius on the out-of-focus areas. Bigger = more "toy camera."
- feather (linear / smooth / expo) - the fall-off curve of blur vs. distance.
smoothis a smoothstep (gentle, the default);exposquares the mask for a tighter, more dramatic fall-off.
The optional orientation input is where it gets interesting: horizontal (the classic band across the middle), vertical (a vertical sharp stripe), or circular (a spot-focus). Circular mode is basically a poor-man's radial blur - blur the edges, keep the center - which is handy for vignetting-style focus pulls.
The inputs that matter
The band of sharpness is defined by focus_position and focus_size; blur_radius and feather define the blur and its edge. That's the whole recipe. The default 0.5 / 0.25 / 25 / smooth is a fine starting point for the classic overhead miniature shot.
Outputs are image and image_list, like the rest of the pack's filters.
Install
Part of lf-nodes:
- ComfyUI Manager: search "LF Nodes", install, restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/lucafoscili/lf-nodes.git, restart.
No models. OpenCV does the blur, and ComfyUI already ships it.
Common issues
- The miniature effect looks fake. It always does on the wrong subject. The trick reads best on high-angle, detail-dense scenes - cityscapes, fields, traffic from above - where the compressed depth sells the illusion. A face-on portrait with a blur band just looks like a misfocused photo.
- Blur radius too small = "what was the point?" 25 is a strong starting blur; below 10 the out-of-focus areas barely read as out of focus. This is one node where the defaults are worth keeping.
- Hard edges on the sharp band. That's a too-small focus_size with a
linearfeather. Widen the band and usesmoothfor a gentler transition. - The before/after slider - the node's optional LF_COMPARE widget lets you slide between original and result while you tune, which is the fastest way to learn what each knob does.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Image to miniature-ify. | |
| focus_position | FLOAT | 0.500–1 | Vertical centre of sharp band (0 = top, 1 = bottom). |
| focus_size | FLOAT | 0.250.05–0.9 | Height of sharp zone as fraction of image. |
| blur_radius | INT | 253–151 | Gaussian radius for out-of-focus areas. |
| feather | COMBO | smooth | Fall-off curve of blur vs distance. |
| orientationopt | COMBO | horizontal | Direction of the focus band. |
| ui_widgetopt | LF_COMPARE | [object Object] | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Image tensor with tilt-shift effect applied. |
| image_list | IMAGE | List of image tensors with tilt-shift effect applied. |