ComfyUI Node Runs on cloud

Batch Unsampler

Adding noise backwards, deliberately

By ttulttul·Created 3 years ago·Updated about a year ago· 120
Batch Unsampler
  • model
  • latent_image
  • latent_batch
sampler_name
scheduler
steps10000
start_at_step0
end_at_step10000
normalizefalse

Samplers remove noise. This node adds it - on purpose, in reverse, and in one go. "Unsampling" is the fun name for running the noise schedule backwards: instead of de-noising a latent down to an image, you walk it up the schedule the model was trained on, producing a whole batch of progressively noisier copies of your latent. It's the engine underneath the legacy Iterative Mixing KSampler nodes, and it's worth understanding on its own because it's where the whole "mix in the noised original" trick gets its fuel.

The inspiration is credited to BlenderNeko's ComfyUI_Noise pack, and the math is straight from the original latent diffusion paper: each step is z + noise × sigma, where sigma comes from the model's real training noise schedule. No conditioning involved, which is why this node never asks for positive or negative prompts.

The inputs that matter

  • steps (default 10000) - yes, ten thousand. The default means "noise all the way back to the start of the schedule," which produces the full range of progressively noisier latents. Lower it if you only want a partial range.
  • sampler_name / scheduler - these only matter because they determine the sigma schedule. Any sampler works; euler + normal is a fine default.
  • start_at_step / end_at_step - literally labeled "untested" by the author. They exist, they're in the schema, but don't bet a workflow on them.
  • latent_image - your clean latent. The output batch is a stack of one latent per sigma step: first element is the least noisy (basically your original), last is the noisiest.
  • normalize - deprecated. The author calls it "highly experimental and unscientific"; in the current code it logs a deprecation warning and subtracts the mean of the first latent. Leave it off.

One output, latent_batch (LATENT). That's a batch tensor, not a list - wire it into Iterative Mixing KSampler Advanced or into one of the two plot nodes to eyeball it.

Why you'd reach for it

Its main job is scaffolding for iterative mixing: upscale a 512px latent 2x, unsample it, and you have a noised sequence that tells the de-noising sampler "stay close to this structure." That's the DemoFusion skip-residual idea the whole pack is built on. But it's also a genuinely nice standalone tool for understanding your model - unsample a real image and watch how fast it dissolves at each sigma, which is exactly what the Latent Batch Statistics Plot was built to check.

Install

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

Or grab it via ComfyUI Manager as "ComfyUI Iterative Mixing Nodes." No model downloads - it only needs the model you already load. The pack's heavy-ish dependencies are matplotlib and scipy, used by its plotting nodes; pip install from requirements.txt handles them.

Gotchas

  • Watch the batch order. The unsampler emits least-noised first. The de-noising samplers want to start from the noisiest latent, which is why Iterative Mixing KSampler Advanced ships with reverse_input_batch defaulting to True. Don't uncheck it out of curiosity.
  • It's on the deprecated path. The README's "Deprecated Nodes" section frames the whole unsampler→KSampler pipeline as the old approach; the author's current recommended flow is IterativeMixingSampler + SamplerCustom. The unsampler concept survives, but if you're starting fresh, that's the node to learn first.
Categorytests

Inputs (8)

NameTypeDefaultDescription
modelMODEL
sampler_nameCOMBO27 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +21
schedulerCOMBO6 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform
stepsINT100000–10000
start_at_stepINT00–10000
end_at_stepINT100001–10000
latent_imageLATENT
normalizeBOOLEANfalse

Outputs (1)

NameTypeDescription
latent_batchLATENT