Nodes/VACE Tools/Load Latent (Absolute Path)
ComfyUI Node

Load Latent (Absolute Path)

When a latent shouldn't be stuck inside ComfyUI's install

By ethanfel·Created 7 months ago·Updated 6 months ago· 9
Load Latent (Absolute Path)
    • LATENT
    path/path/to/latent.latent

    ComfyUI's built-in Load Latent only reads from models/latents/, and the built-in Save Latent only writes to output/ - both paths pinned to whatever machine the install lives on. LoadLatentAbsolute is the escape hatch: you hand it an absolute file path and it hands you a LATENT, no copying files into your install, no hunting through folders. It's a small node and it's meant to be one. If you've ever wanted to stash a latent on a scratch drive, hand a .latent file to a friend, or keep intermediates outside the ComfyUI directory tree entirely, this is the one.

    It's one half of a pair - the pack's Save Latent (Absolute Path) writes these files, and this loads them back. Used together they're the lazy man's latent interchange format: pick a path, run, done.

    How it works

    Under the hood it's plain safetensors. The load expands ~ in your path, reads the file, and - the bit that makes it useful - remaps the latent_tensor key to samples if it finds it. That remap is why this node will happily load files that ComfyUI's own built-in Save Latent produced, not just ones written by its sibling in this pack. On top of that it reads the file's header metadata: if the save recorded the tensors' original devices, they get moved back; any non-tensor data that was stashed in the header (things like noise_mask) comes back too.

    The only input is path (a string, default /path/to/latent.latent). The only output is a LATENT, which you wire into anything that expects one - a VAE Decode, a sampler, a VACE encode, whatever. No lists, no options, no surprises.

    How to install it

    This node ships in ComfyUI-VACE-Tools, a small utility pack by ethanfel - the same person behind ComfyUI-LoRA-Optimizer and ComfyUI-Krea2TexTEncoder. Install the pack once and you get all seven nodes it contains, including this one:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/ethanfel/Comfyui-VACE-Tools.git
    

    Then restart ComfyUI. You can also find it through ComfyUI Manager by searching "VACE Tools" or the repo name. The pack declares zero Python dependencies - it rides on the torch and safetensors ComfyUI already bundles - and it downloads no models, because it doesn't need any.

    Common issues

    The obvious one: the file has to actually exist at the path you give it, and it has to be a valid safetensors file - point it at garbage and you get a parse error, not a friendly message. Keep the .latent extension consistent with how you saved it (the save node appends it automatically if you forget). And if you save on one machine and load on another, the device-restore logic moves tensors back to the recorded device - which is exactly what you want when the save was made on a cuda device and you're loading on the same. If you were hoping this node would create the file if it's missing, it won't; you want the save node for that.

    Categorylatent

    Inputs (1)

    NameTypeDefaultDescription
    pathSTRING/path/to/latent.latent

    Outputs (1)

    NameTypeDescription
    LATENTLATENT