Nodes/ComfyUI Iterative Mixing Nodes/IterativeMixingSampler
ComfyUI Node Runs on cloud

IterativeMixingSampler

The version that doesn't come out grainy

By ttulttul·Created 3 years ago·Updated about a year ago· 120
IterativeMixingSampler
  • model
  • SAMPLER
samplereuler
alpha_12.40
blending_schedulecosine
blending_functionaddition
normalize_on_meanfalse
start_blending_at_pct0.00
stop_blending_at_pct1.00
clamp_blending_at_pct1.00
blend_min0.00
blend_max1.00
perlin_modemasks
perlin_strength0.750
perlin_scale10.00
rewindfalse
rewind_min0.50
rewind_max0.80

This is the node the pack was rewritten around, and the one you should actually use. The earlier Iterative Mixing KSampler nodes had a fatal flaw: they called ComfyUI's internal sample() to denoise, and the output came out grainy for reasons even the author didn't fully understand. After comfyanonymous himself suggested it, ttulttul rebuilt the technique as a proper SamplerCustom-compatible sampler, and the graininess mostly went away. If you want to try iterative mixing in 2026, this is the on-ramp.

What it does

The idea is unchanged from the DemoFusion paper: as the sampler denoises, it keeps mixing in a declining fraction of a progressively noised copy of your latent, so the higher-resolution output stays structurally faithful to the source instead of sprouting extra limbs. What changed is the plumbing - this node outputs a SAMPLER object that you feed into a stock SamplerCustom node alongside a SIGMAS provider (the pack's own IterativeMixingScheduler, or a core scheduler).

One critical rule, straight from the README, all-caps worthy:

Do not enable add_noise on the SamplerCustom node. The iterative mixing sampler injects its own noise; letting SamplerCustom add more "will generate garbage." Turn it off and leave it off.

The inputs that matter

  • sampler - the pack's own sampler implementations: euler, euler_perlin, lcm, dpmpp_2m. euler is the sane default. euler_perlin is where the perlin knobs below come alive.
  • alpha_1 (default 2.4) - steepness of the blending curve. Lower = more noised-latent guidance early; higher = more freedom for the model. The README's sweet-spot advice for the technique is 0.1–5.0 territory.
  • blending_schedule - cosine, logistic, or linear. Try each; the author insists there's no best answer.
  • blending_function - addition, slerp, norm_only. Slerp tends to be the winner in high-dimensional space.
  • start_blending_at_pct / stop_blending_at_pct / clamp_blending_at_pct - where the curve begins, ends, and gets capped at 1.0. For a first run, leave all at their defaults (0 / 1 / 1).
  • blend_min / blend_max - squeeze the curve's floor and ceiling. blend_max below 1.0 guarantees some noised latent is always in the mix.
  • perlin_mode / perlin_strength / perlin_scale - only meaningful with euler_perlin. The README is refreshingly honest that it's "highly experimental and subject to change." perlin_scale near 1.0 is near-pure noise; near 100 is huge blobs.
  • rewind / rewind_min / rewind_max - very experimental. With rewind on, the sampler finishes, renoises back to rewind_min (default 50%) of steps, samples forward again, then rewinds half as far each cycle until it'd pass rewind_max. It's a "second chance at detail" heuristic that can un-blur results.
  • normalize_on_mean - deprecated, does nothing but log a warning. Ignore it.

Wiring it up

The minimal custom-sampling stack:

  1. IterativeMixingScheduler (or Advanced) → SIGMAS
  2. IterativeMixingSamplerSAMPLER
  3. Both into a SamplerCustom, with add_noise off, along with your model, positive, negative and latent

Then expect to bolt a cleanup pass on the output - a plain KSampler at denoise 0.05–0.25. Even the clean sampler leaves residual noise; the model was never trained for this dance, and a light second pass is the standard fix.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/ttulttul/ComfyUI-Iterative-Mixer
# restart ComfyUI

Or ComfyUI Manager → "ComfyUI Iterative Mixing Nodes" (registered on the Comfy Registry). No model files. Dependencies are torch, numpy, matplotlib, Pillow, tqdm, scipy - the last two/three are what the plotting and perlin code leans on.

Where people get burned: forgetting add_noise is off (garbage output), and using VAEEncodeForInpaint (it erases the masked area, leaving nothing to blend). Everything else is just taste.

Categorysampling/custom_sampling/samplers

Inputs (17)

NameTypeDefaultDescription
modelMODEL
samplerCOMBOeuler4 options: euler, euler_perlin, lcm, dpmpp_2m
alpha_1FLOAT2.400.05–100
blending_scheduleCOMBOcosine3 options: cosine, linear, logistic
blending_functionCOMBOaddition3 options: addition, norm_only, slerp
normalize_on_meanBOOLEANfalse
start_blending_at_pctFLOAT0.00
stop_blending_at_pctFLOAT1.00
clamp_blending_at_pctFLOAT1.000–1
blend_minFLOAT0.00
blend_maxFLOAT1.00
perlin_modeCOMBOmasks3 options: masks, latents, matched_noise
perlin_strengthFLOAT0.750
perlin_scaleFLOAT10.000.1–400
rewindBOOLEANfalse
rewind_minFLOAT0.500–0.99
rewind_maxFLOAT0.800.01–0.99

Outputs (1)

NameTypeDescription
SAMPLERSAMPLER