Image Iterative Sampler
The deforum-style image morph loop, compressed into one node
- model
- positive
- negative
- latent_image
- wave_config
- vae
- checkpoint_config
- latent_batch
Deforum made a generation of SD users obsessed with the zoom-morph: take one image, re-sample it over and over with a little zoom, a little prompt drift, a little injected noise, and you get a hypnotic motion loop out of a still. That workflow has been awkward to port to ComfyUI for years because it's really a loop wearing a mask. Image Iterative Sampler is the loop wearing a node: point it at a latent, and it re-samples that image over and over - with progressive steps, exponential zoom, and fresh noise - until you have a batch of frames that animate like a deforum clip.
How it works
The sampler takes your starting latent and runs through cycles, each cycle holding a fixed seed and stepping through a ramp of denoise steps. Between iterations it applies the stuff that makes deforum look like deforum:
- Zoom - an exponential per-iteration multiplier (from the controller's
zoom_rate, e.g. 1.05 = 5% per pass). The sampler does this in pixel space by decoding, scaling, and re-encoding through the VAE, because zooming raw latents corrupts them. That's why a VAE is mandatory when zoom is enabled. - Noise injection - each pass gets
noise_injection_strengthworth of fresh noise so the image actually drifts instead of locking onto itself. Lock the injection seed (lock_injection_seed) to keep the drift pattern stable across cycles. - Feedback -
feedback_modeset toprevious_iterationfeeds the last output latent back as the next input, the classic chaining trick for smoother morphs. - Optional wave extras - if you've threaded CLIP vision, style, ControlNet or IPAdapter data into the
wave_config, each applies here per-cycle with wave-modulated strength.
Inputs that matter
- noise_injection_strength - the chaos dial. 0.1 is a gentle drift; 0.3+ gets actively trippy. This is the single knob that decides whether you get "smooth morph" or "glitch art."
- feedback_mode -
noneorprevious_iteration. On for tighter continuity, off if you want each frame more independent. - latent_image - your starting image, VAE-encoded.
- wave_config - from the Image Wave Controller; without it this node refuses to run (it requires a wave_config input).
- vae (optional) - required the moment zoom is on; also used for noise injection and checkpoint previews.
- checkpoint_config (optional) - from Iterative Checkpoint Controller, so long morphs save their progress.
Standard sampler dials round it out: model, positive, negative, seed, add_noise, sampler_name, scheduler, cfg (default 1.0). Output is a latent_batch - decode it and save the frames as a video or GIF.
Installing it
Ships in kentskooking-nodes: ComfyUI Manager → search kentskooking-nodes → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Kentskooking/kentskooking-nodes
Restart after. No models to download.
Common issues
- "ImageIterativeSampler requires a VAE input when zoom is enabled" - the most common stumble.
zoom_rate≠ 1.0 (or a nonzerozoom_maxin the wave config) means the sampler needs a VAE for pixel-space zooming. Connect one, or disable zoom. - Frames that drift into mush - noise injection too high or
feedback_modechaining runaway drift. Dropnoise_injection_strengthtoward 0.05. - It runs forever - exponential zoom multiplies frame resolution each pass; keep
zoom_ratemodest (1.01–1.05) unless you enjoy watching your VRAM evaporate.
The pack ships an example workflow (Image Iterative Sampler - zImage.json) - load that before you hand-roll anything.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| latent_image | LATENT | — | |
| wave_config | WAVE_CONFIG | — | |
| seed | INT | 00–18446744073709550000 | — |
| add_noise | BOOLEAN | true | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| cfg | FLOAT | 1.00–100 | — |
| noise_injection_strength | FLOAT | 0.100–1 | — |
| lock_injection_seed | BOOLEAN | false | — |
| feedback_mode | COMBO | none | 2 options: none, previous_iteration |
| vaeopt | VAE | Required when zoom is enabled (zoom_min != zoom_max) for pixel-space zoom processing. Optional for noise injection and checkpoint preview. | |
| checkpoint_configopt | CHECKPOINT_CONFIG | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent_batch | LATENT | — |