Nodes/ComfyUI-BFSNodes/Save H3 Latent / nested-safe (BFS)
ComfyUI Node

Save H3 Latent / nested-safe (BFS)

Save the H3 latent without the native node crashing on it

By alisson-anjos·Created 5 months ago·Updated about 21 hours ago· 105
Save H3 Latent / nested-safe (BFS)
  • samples
    filename_prefixh3_latent

    The stock SaveLatent node blows up on MiniMax-H3 latents. The H3 latent arrives as a nested tensor - video and audio packed together - and the native node calls .contiguous() straight on it, which doesn't fly. SaveH3Latent exists to do that one job properly: it unbinds the nested components and writes each one to its own safetensors file in ComfyUI's output folder.

    Inputs are minimal: samples (the H3 latent, straight off the sampler) and filename_prefix (default h3_latent). That's it. It's an output node - nothing to wire out, and ComfyUI treats it as a terminal point in the graph.

    Files land in ComfyUI/output as {prefix}_{NNNNN}.safetensors. The node auto-increments the counter, so you never clobber an earlier save. Each file carries metadata recording the format and every component's shape, and the console prints the path plus each tensor's shape and dtype. Component 0 is the video latent; component 1 is the audio, if it was there.

    When you'd actually use this

    Honestly: debugging. You use it when you want to inspect the latent outside the graph, feed it to a standalone decode script, or just confirm the shape is what you think before it hits the sampler. If the pipeline works end-to-end, you don't need it - it's the "hold up, what's actually in this latent?" tool. Niche, but when the native node hard-crashes mid-graph, it beats commenting out half your workflow to find out.

    Installing it

    It's part of the ComfyUI-BFSNodes pack. ComfyUI Manager (search ComfyUI-BFSNodes) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/alisson-anjos/ComfyUI-BFSNodes.git
    cd ComfyUI-BFSNodes
    pip install -r requirements.txt
    

    Restart ComfyUI and it appears under BFS/debug.

    Common issues

    Not much to go wrong - the whole point is that it handles the nested latent the native node can't. The one thing to remember is where it saves: look in ComfyUI/output, not in the workflow's preview panel. And don't be surprised the file looks unfamiliar when you open it in an image viewer - a .safetensors latent isn't an image, which is kind of the point. If that's what you actually wanted, you wanted MiniMaxH3DirectDecode and a Save Image instead.

    CategoryBFS/debug

    Inputs (2)

    NameTypeDefaultDescription
    samplesLATENT
    filename_prefixSTRINGh3_latent

    Outputs (0)

    No outputs