ComfyUI Node

RALUNoiseSource

Where your seed lives, and what 'correlated_ralu' actually means

By Milkyawaway·Created 3 months ago·Updated 3 months ago· 0
RALUNoiseSource
    • NOISE
    width1024
    height1024
    batch_size1
    seed0
    noise_modegaussian

    RALUNoiseSource is the pack's stand-in for ComfyUI's normal RandomNoise node - with one twist that matters: a noise_mode toggle between gaussian and correlated_ralu. If you've ever built a custom-sampling graph in ComfyUI, the shape of this node will feel familiar. You feed it a size and a seed, and out comes a NOISE object for the sampler.

    Small lie in that description, and it's worth knowing: the NOISE it outputs isn't actually a tensor of random values. It's a small object carrying your seed, mode, and dimensions - the sampler calls generate_noise() on it later, at the point where noise is actually needed. That's standard ComfyUI NOISE behavior, so don't be surprised that the output looks "empty."

    What the mode toggle does

    This is the input that decides whether you get RALU sampling at all. In RALUSamplerCore and the FLUX path, the noise object's noise_mode is read directly:

    • gaussian - plain prepare_noise, the normal per-pixel Gaussian noise you'd get anywhere. This is the "boring" path.
    • correlated_ralu - the signature RALU noise. When the sampler upsamples selected tokens to a higher resolution, it injects fresh noise that's Cholesky-correlated within blocks, with a correlation strength derived from the schedule parameter Z (gamma = -1/Z²). The point of the correlation: new detail noise is added on top of the low-res structure without destroying it. That's the trick that makes mixed-resolution sampling actually hold together.

    The rest of the inputs are simple: width, height, batch_size, and seed. There's a nice gotcha baked into the FLUX path: if you feed correlated_ralu noise into RALUSamplerCore with family=flux and the scheduler left at its default placeholder, the core auto-promotes itself to the real ralu scheduler and custom sampler. In other words, picking correlated_ralu here is what switches the whole pipeline into RALU mode. Set it to gaussian and the placeholder path falls back to plain Euler sampling.

    Wiring it up

    The NOISE output feeds the noise_state input on RALUSamplerCore, SD3LowResDenoise, or SD3TwoStageDenoise. In the pack's SD3 example workflow (sd3.5-ralu.json) it runs at 512×512 with correlated_ralu and a fixed seed straight into SD3LowResDenoise. Same pattern for FLUX. Width and height here should match your intended canvas - the sampler uses them for the stage-token arithmetic.

    Installing

    cd /path/to/ComfyUI/custom_nodes
    git clone https://github.com/Milkyawaway/comfyui-ralu-sampling.git
    cd /path/to/ComfyUI
    python -m pip install opencv-python numpy typing-extensions
    python main.py
    

    ComfyUI Manager search "comfyui-ralu-sampling" works too; restart afterwards. This pack needs a recent ComfyUI because it registers via the modern comfy_api.latest entrypoint.

    Troubleshooting

    • Results not reproducing between runs? This node owns the seed. gaussian noise with the same seed is deterministic; correlated_ralu also seeds its Cholesky generator internally. If anything drifts, check this node's seed first.
    • You set correlated_ralu but got plain sampling anyway - make sure family is flux on the sampler side. The auto-promote to the RALU scheduler only fires for flux; for SD3 the two-stage nodes handle their own noise injection.
    • Nothing in your palette after install means an outdated ComfyUI - update it. And remember the pack only really supports the flux and sd3 families; generic/sdxl combos throw "not implemented yet."
    Categorysampling/custom_sampling/noise/ralu

    Inputs (5)

    NameTypeDefaultDescription
    widthINT102416–16384
    heightINT102416–16384
    batch_sizeINT11–4096
    seedINT00–18446744073709550000
    noise_modeCOMBOgaussian2 options: gaussian, correlated_ralu

    Outputs (1)

    NameTypeDescription
    NOISENOISE