Nodes/ComfyUI-MAINodes/H3 Trajectory Load (branch from a step)
ComfyUI Node

H3 Trajectory Load (branch from a step)

Resume a sampling run at step 18, not step 0

By matlowai·Created 17 days ago·Updated about 16 hours ago· 112
H3 Trajectory Load (branch from a step)
    • samples
    • remaining_sigmas
    • loaded_step
    dump_dir/tmp/h3_trajectory
    step5

    H3 Trajectory Load is the other half of the checkpoint pair, and it does the thing the name promises: it loads a step checkpoint saved by H3 Trajectory Bank and hands you the exact noisy latent plus the matching remaining sigma schedule. Wire those into a SamplerCustomAdvanced with DisableNoise and sampling continues precisely where the banked run stopped - under whatever model, LoRA, or guider you attach. Changing anything downstream of the loaded step is the entire point.

    How to wire it

    Two inputs, both from the matching bank:

    • dump_dir - must be the same directory H3 Trajectory Bank wrote to (default /tmp/h3_trajectory).
    • step - resume after this saved step, 0-based (default 5). "Resume after step 5" means the run continues with step 6's work - the checkpoint saved at step 5 is the state before step 6.

    Outputs:

    • samples - the loaded x_t, wired into SamplerCustomAdvanced's latent input.
    • remaining_sigmas - the sigmas left to sample, wired into its sigmas input. This is the subtle part: you don't reuse the original full schedule, you use the remaining one, or the resume drifts off-track.
    • loaded_step - which step you actually got, for sanity-checking the wire-up.

    The companion requirement: the sampler must run with DisableNoise, because the latent already carries its noise - re-adding noise would double it and the "resume" would just be a different, worse start. If your SamplerCustomAdvanced isn't set to DisableNoise, that's the first thing to check when the resumed run looks wrong.

    The workflow it enables

    The canonical use is branching: run once to a checkpoint you like, then try three different tails - a turbo LoRA for the low-sigma steps, a different scheduler, a tighter guider - without re-running the head. On video work where a single step is seconds, this turns "I wonder what happens if I change the last quarter of the schedule" from a full re-render into a partial one. It also pairs naturally with the bank on the same dump_dir, so a crashed long run costs you nothing but the steps after the last checkpoint.

    Install

    Ships with matlowai/ComfyUI-MAINodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/matlowai/ComfyUI-MAINodes
    

    Restart, under latent/minimax/motion. No extra Python deps; you need MiniMax-H3 weights and ComfyUI's H3 support (check the licence's US/EU/UK/Korea carve-outs).

    The honest caveat: this is a generic sampler-resume trick, not H3-specific magic, and it's as powerful as your discipline. Keep the latent shape fixed between bank and load, remember DisableNoise, and you'll wonder why every sampler doesn't ship a checkpoint. Skip those two things and you'll spend an hour debugging a "resume" that was never actually a resume.

    Categorylatent/minimax/motion

    Inputs (2)

    NameTypeDefaultDescription
    dump_dirSTRING/tmp/h3_trajectory
    stepINT50–200resume after this saved step (0-based)

    Outputs (3)

    NameTypeDescription
    samplesLATENT
    remaining_sigmasSIGMAS
    loaded_stepINT