Nodes/Node_Fun_ComfyUI/Layered Infinite Zoom
ComfyUI Node

Layered Infinite Zoom

The infinite zoom effect, no model required — just math

By nofunstudio·Created 2 years ago·Updated about a month ago· 9
Layered Infinite Zoom
  • image1
  • image2
  • image3
  • image4
  • image5
  • zoomed_sequence
frames_per_intro16
easing_functionease_in_out_cubic

Layered Infinite Zoom is the "hypnotic zoom into the painting" effect you've seen in a thousand AI video showcases, except it does it with zero diffusion. No model, no sampler, no VRAM hit - you feed it five still images and it manufactures an infinite-zoom animation by scaling and stacking them. If you've ever wanted that endless-dolly look without burning a video model run, this is the cheapest way to get it.

Here's the trick, and it's a clever one. The node works on a canvas that's 2× the final size. Your newest image enters at 200% scale and shrinks down to 100%, while every image that came before it keeps shrinking by another factor of 2 - so image1 ends up tiny in the background while image5 fills the frame and keeps growing. Each frame is a center-crop down to a 1024×1024 output. Because each layer is at a different scale, the composite looks like you're flying through layers of the same image forever, even though nothing is actually being generated.

The inputs are simple. You give it image1 through image5, in the order the README is explicit about: image1 is the smallest/background layer, image5 is the largest/foreground. Then:

  • frames_per_intro (default 16): how many frames each new image spends shrinking to full size. Lower = snappier zoom but choppier motion; higher = smoother but longer.
  • easing_function (default ease_in_out_cubic): the default eases in and out for a smooth, organic push; switch to linear if you want a constant-speed dolly.

The one output, zoomed_sequence, is an IMAGE batch - one tensor per frame, all 1024×1024. That's a list of stills, not a video file. To get an actual clip you need to do the last mile yourself: save the frames out and stitch them with ffmpeg, or feed them into a video node that eats image batches.

ffmpeg -framerate 24 -i frame_%04d.png -c:v libx264 -pix_fmt yuv420p zoom.mp4

The classic play here is to generate the five layers with a checkpoint at different prompts or subjects - say, a wide shot, a mid shot, a close-up of the same scene - and let the zoom carry you through them. People do this as a cheaper stand-in for a real video model, and honestly for a "Ken Burns into a dream" mood it holds up.

Gotchas worth knowing. All five images should be the same resolution or the layering math gets weird. Each new image enters at 200% scale, which is why the README mentions "at most 200% upscaling" - you're not inventing detail beyond that, so the outermost layer's edges can soft-blur as it scales up. And keep an eye on how many frames you're generating: at 24 fps you need 24 frames per second of video, and a couple hundred frames of 1024×1024 PNGs eats disk fast.

It's part of the Node_Fun_ComfyUI pack, which means the standard install: ComfyUI Manager, search "Node Fun", or git clone https://github.com/nofunstudio/Node_Fun_ComfyUI into custom_nodes, install requirements.txt, restart. This particular node pulls in nothing extra - it's pure Pillow/torch compositing. The author bills it as "Layered Infinite Zoom 2x" and it delivers exactly that, with no surprises and no API bill.

CategoryNo Fun

Inputs (7)

NameTypeDefaultDescription
image1IMAGE
image2IMAGE
image3IMAGE
image4IMAGE
image5IMAGE
frames_per_introINT16
easing_functionCOMBOease_in_out_cubic2 options: ease_in_out_cubic, linear

Outputs (1)

NameTypeDescription
zoomed_sequenceIMAGE