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 about a month ago·Updated 10 days ago· 160
H3 Trajectory Load (branch from a step)
  • reference
  • samples
  • remaining_sigmas
  • loaded_step
dump_dir/tmp/h3_trajectory
step5
audio_scale4.00
undo_const_scalingfalse

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 (5)

NameTypeDefaultDescription
dump_dirSTRING/tmp/h3_trajectory
stepINT50–200resume FROM this saved step (0-based): the file holds x entering step k at sigma[k]; remaining_sigmas = sigmas[k:]
referenceoptLATENTthe LATENT the banked run sampled from (e.g. MiniMaxH3ImageToVideo); supplies the stream shapes when the bank file predates latent_shapes (AV models pack video+audio into one flat vector at the sampler)
audio_scaleoptFLOAT4.000–64the sampler carries the audio stream scaled onto the video schedule by shift/audio_shift (H3: 12/3 = 4); a bank file is in that space, so the unpacked audio is divided by this before it re-enters as a LATENT (where process_latent_in re-applies it). A value recorded in the bank file wins over this widget; 0 = leave as-is.
undo_const_scalingoptBOOLEANfalseflow/CONST models: SamplerCustomAdvanced applies (1-sigma_k)*latent + sigma_k*noise on entry, so a DisableNoise resume must be pre-divided by (1-sigma_k). Uses the banked sigma_k, i.e. assumes this node's own remaining_sigmas is the schedule you wire. Off = raw (do it in-graph with LatentMultiply).

Outputs (3)

NameTypeDescription
samplesLATENT
remaining_sigmasSIGMAS
loaded_stepINT