ComfyUI Node

DTLoadLatent

Loading a saved latent back — a quieter twin of the core node

By yolanother·Created 3 years ago·Updated 2 years ago· 1
DTLoadLatent
    • LATENT
    latent

    The latent is the compressed representation your sampler actually works in - the "image" before it's ever decoded into pixels, per the KB's concepts essay. Saving one lets you stop a generation mid-flow and resume it later, or hand a half-sampled state to a different part of a workflow. DTLoadLatent is the pack's node for getting those saved latents back: it lists .latent files, you pick one, and out comes a LATENT you feed straight into a KSampler.

    Quick honesty check before you go further: this node is essentially a re-skin of ComfyUI's core LoadLatent node. Same job, same .latent format, same input-directory requirement. It's not online - despite the pack's theme, this one reads from your local ComfyUI input folder. If you already use core LoadLatent, there is no new capability here, which makes this the pack's most redundant node. It's here because the author mirrored core ComfyUI's loader set for completeness.

    Input and output

    • latent - a dropdown listing .latent files found in your ComfyUI input directory. Empty dropdown = no .latent files there yet.
    • Output: LATENT - plugs into the latent input of a KSampler, or anywhere else a latent is accepted.

    How it works

    The node scans the input folder for files ending in .latent, loads the chosen one with safetensors, pulls the latent_tensor out, and wraps it as a samples dict. Two touches that show it's a bit more careful than a bare copy: it hashes the file for change-detection (so a modified latent actually re-triggers) and validates the file exists before execution.

    The practical catch is the folder. Core SaveLatent writes .latent files to your output directory, but this loader reads from the input directory - the same one you drag images into. So the flow is: run SaveLatent, grab the file from ComfyUI/output, and drop it in the input folder before this node (or core LoadLatent) can see it. Same dance as the core node, same footgun.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/yolanother/DTAIComfyLoaders
    

    or search "DTAIComfyLoaders" ("Comfy UI Online Loaders") in ComfyUI Manager, then restart. Only dependency is requests.

    Where people get burned

    • The file isn't where the node looks. Saved latents land in output; this node reads input. Move the file (or save it where the loader expects) or the dropdown stays empty.
    • Wrong extension. Only .latent files are listed. A .safetensors latent or a renamed file won't show up.
    • Expecting a download. There's nothing online here. If the dropdown is empty, that's a local filesystem situation, not a server situation - the one node in this pack where you can't blame DoubTech.

    Reach for it if you're already running the pack and want latent-resume without learning a new format - it works fine. If you're choosing between this and core LoadLatent, flip a coin; they're functionally the same node, and the core one is one less install.

    CategoryDoubTech/Loaders

    Inputs (1)

    NameTypeDefaultDescription
    latentCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    LATENTLATENT