Nodes/Latent Tools/LTLatentLoad
ComfyUI Node

LTLatentLoad

Reuse a Noise Pattern You Already Made

By Machines-of-Disruption·Created about a year ago·Updated 8 months ago· 27
LTLatentLoad
    • LATENT
    file_pathinput/latent.pt
    normalizeno
    rand_signfalse
    rand_sign_seed0

    LTLatentLoad loads a latent from a .pt file on disk. Because getting one good noise pattern usually takes a bunch of fiddling - the right mean, the right std, the right blend - saving it and reloading it later is the entire point of this node. Generate once, save, and every future workflow starts from the same noise without you re-deriving the settings by hand.

    It's the quiet workhorse of the pack. The flashy nodes get the screenshots; this one is what lets you actually keep and reuse your experiments. The author built the pack around the idea that starting noise is a creative lever - this node is the part that makes that repeatable.

    How it works

    Straight torch.load() on a .pt file sitting in ComfyUI's input directory. Details that matter:

    • It accepts either a plain tensor or a dict with a "samples" key - the standard ComfyUI latent format - so it can load files saved by other latent-save nodes.
    • fp64 tensors get converted to fp32. Numpy defaults to float64, and people save latents that way, which would silently break downstream - this catches it.
    • A saved 3D tensor gets a batch dimension added, since a LATENT is supposed to be a batch.
    • It hashes the file on every load, so ComfyUI detects when you swap the file on disk and reruns instead of caching a stale result.

    The file_path dropdown enumerates every .pt under ComfyUI/input (including subfolders), so no typing paths - just pick.

    The inputs that matter

    • file_path - dropdown of .pt files in your input directory.
    • normalize - no / channel / image, and the tooltip spells it out: z-score (μ=0, σ=1) either each channel separately or the whole latent. Pick channel for most diffusion latents, where per-channel stats are what the model expects.
    • rand_sign - the fun one. Flips the sign of every element at random, seeded by rand_sign_seed. A sign-flipped noise has the same distribution but is a different pattern - effectively a fresh "seed" pulled out of a file you already know you like. Great for variation without re-rolling everything.
    • rand_sign_seed - the seed for that flip.

    Where people get burned

    The file has to exist, and the error is a straight "File does not exist" - so put the .pt in ComfyUI/input first, or the dropdown won't list it. And remember the shape-check downstream: a latent saved at one resolution fed into a sampler expecting another will assert. If you're moving noise between projects, normalize it and keep an eye on dimensions.

    Installing it

    Part of xl0's Latent Tools pack. ComfyUI Manager → search Latent Tools → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/xl0/latent-tools
    

    Restart, and it's under LatentTools. The pack's only dependency is lovely-tensors (Manager installs it; manual cloners may need pip install lovely-tensors). No model downloads.

    CategoryLatentTools

    Inputs (4)

    NameTypeDefaultDescription
    file_pathCOMBOinput/latent.pt0 options:
    normalizeCOMBOnoNormalize (μ=0, σ=1) either each channel separately, or the latent as a whole
    rand_signBOOLEANfalseFlip the sign of the elements at random
    rand_sign_seedINT00–18446744073709550000The random seed used to flip the signs

    Outputs (1)

    NameTypeDescription
    LATENTLATENT