Batch Zoom (Direction + Amount Type)
Keep one continuous zoom across streamed chunks
- images
- images
- info
Here's the problem this node exists for. The plain Zoom Sequence node zooms across whatever batch you hand it - start at 0%, end at 100%, one clean pass. But what if your video is too long to process in one batch? You stream it through ComfyUI in chunks: frames 0–100, then 101–200, then 201–300. Run the plain zoom node on each chunk and the zoom restarts for every chunk - you get a sawtooth of resetting push-ins instead of one continuous move.
Batch Zoom is the fix. It's the same zoom logic, but it stores its state in a temporary JSON file between node calls, so the zoom continues from where the previous chunk left off instead of resetting. If you're processing video in chunks for VRAM reasons - which is common with long VHS-loaded clips - this is the node you want.
How it works
The node tracks the last processed global frame index, the running zoom margin, the canvas dimensions, and the easing/mode settings, persisting them across executions. When you feed it the next chunk, it resumes the zoom from the last frame instead of starting over. State clears automatically when it reaches the end - source_frame_count - 1 - so the next video starts fresh. The random modes are handled the way you'd hope: direction = Random and ease = Random roll once per sequence and keep that same choice across all chunks, so your video doesn't change its mind halfway through. With random_seed = 0, a new effective seed is generated at sequence start and held for all chunks.
Inputs and output
images- the current batch of frames.source_frame_count- the total number of frames in the whole video. This is the critical one; it tells the node where "end" is so it knows when to reset state. Feed it wrong and your zoom may not know the sequence is over.direction- Zoom In / Zoom Out / Randomamount_type- Pixels per Frame / Target Percentage, withpixels_per_frameandzoom_percentageas before (default 110 = 110%)ease- Linear / Ease_In / Ease_Out / Ease_In_Out / Randomrandom_seed- 0 = auto per sequence, > 0 = reproduciblesmooth_subpixel- continuous subpixel sampling, on by default
Outputs: images (the zoomed chunk) and info (diagnostics). Feed each new chunk back in and keep the workflow alive across batches.
Installing it
Part of the Simple Video Effects pack:
cd ComfyUI/custom_nodes
git clone https://github.com/scofano/ComfyUI-Simple-video-effects
cd ComfyUI-Simple-video-effects
pip install -r requirements.txt
Restart ComfyUI, or install via ComfyUI Manager ("Simple Video Effects"). No models; pure torch image math.
Common issues
The one setting that bites people is source_frame_count. If you feed in the count of the current chunk instead of the whole video, the node resets state early and you get the same restart bug you were trying to escape. State also lives in a temp JSON file, so if you interrupt a run and restart, the saved zoom state may be stale - if a zoom looks wrong on the next run, check that a leftover state file isn't being picked up; clearing it (or letting the run complete) fixes it. And as with the single-batch version, amount_type confusion applies: Target Percentage is usually the sane choice for a whole long clip.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| source_frame_count | INT | 11–100000 | — |
| direction | COMBO | Zoom In | 3 options: Zoom In, Zoom Out, Random |
| amount_type | COMBO | Pixels per Frame | 2 options: Pixels per Frame, Target Percentage |
| pixels_per_frame | FLOAT | 1.00 | — |
| zoom_percentage | INT | 110100–10000 | — |
| ease | COMBO | Linear | 5 options: Linear, Ease_In, Ease_Out, Ease_In_Out, Random |
| random_seed | INT | 00–2147483647 | — |
| smooth_subpixel | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| info | STRING | — |