ComfyUI Node

Seperable Batch Noise

Batch noise where every image has a seed you can actually reuse

By chrisgoringe·Created 2 years ago·Updated 2 years ago· 20
Seperable Batch Noise
    • NOISE
    seed0
    seed_delta1

    Generate a batch of four with a normal RandomNoise node and later want to reproduce "the second image" on its own? Good luck - ComfyUI derives each batch entry's noise from the one seed in a way you can't easily reverse. Seperable Batch Noise is the fix: it generates batch noise so that each entry has a seed you can compute by hand and reuse anywhere.

    How it works

    The node doesn't take a noise source at all - it is the noise source. Give it a starting seed and a seed_delta, and entry i of the batch gets noise generated from:

    seed + i * seed_delta
    

    So with seed 1000 and delta 1, a batch of four uses seeds 1000, 1001, 1002, 1003. The third image used seed 1002. That's the entire trick, and it's why it's called "seperable": the seed of each output is separated out into something you can derive instead of being buried inside a batch operation. (Yes, "Seperable" is misspelled in the pack - that's the actual registered class name, so search it that way.)

    The inputs

    • seed - the seed for the first entry in the batch.
    • seed_delta - how much the seed increments per entry. Can be negative if you want your batch to count down.

    Both are plain INTs. Output is a single NOISE generator, wired exactly like any other noise source - into the noise socket of SamplerCustomAdvanced.

    Using it

    Set the seed and delta, plug the NOISE output into a SamplerCustomAdvanced (or anywhere else that takes a NOISE input), and set your latent's batch size. The value of this shows up later: when you've picked "image 2" out of the batch and want it alone at full effort, you don't re-roll the dice - you just set a RandomNoise to seed 1001 and generate. Same seed, same noise, same image. That's the whole point of the node: reproducibility you can reason about.

    Where it shines is any workflow where you iterate on a batch - pick a winner, regenerate that one entry with different settings, and be confident the same starting noise is doing the work so your comparisons mean something. Combined with the companion Batch Noise Simulate in this pack, it gives you both directions: clean seeds going in, and a way to recover batch noise when you didn't use them.

    Installing

    Boring and easy, which is good: no models, no extra packages. The pack needs only torch and ComfyUI's built-in comfy_extras. Via ComfyUI Manager search for "cg-noisetools", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/chrisgoringe/cg-noisetools
    

    restart, and it's there. The whole pack is marked experimental by the author, and this node is one of the two batch helpers he added a week after the initial release - it's stable in practice, just don't expect a changelog ceremony about it.

    Categorynoise

    Inputs (2)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000
    seed_deltaINT1-1000000000–1000000000

    Outputs (1)

    NameTypeDescription
    NOISENOISE