Nodes/ComfyUI-DaSiWa-Nodes/MiniMaxH3 • De-rope Prepare
ComfyUI Node

MiniMaxH3 • De-rope Prepare

Slow the clip down so the model can actually draw the punch

By darksidewalker·Created 8 months ago·Updated a day ago· 243
MiniMaxH3 • De-rope Prepare
  • images
  • samples
  • vae
  • audio
  • audio_vae
  • conditioning
  • latent
  • hold_map
  • report
  • conditioning
◄presetbalanced►
◄frame_rate24.00►
◄keep_keyframestrue►

H3 does gorgeous synced-audio video and then hands you a spin, a sword arc or a fast reversal that looks like someone smeared butter across the frame. That's not your prompt. H3's video latent packs four frames into one token, and four very different poses do not fit inside one token. When the pose changes faster than the token can represent, you get soup.

De-rope is the fix after the fact, and this is the half that does the thinking. It reads the baseline latent, works out which spans were too fast for the token grid, holds those frames so the model gets room, and hands you a slowed copy of the clip as an audio-video latent ready for a partial-denoise second pass. De-rope Recover then throws the held frames away and gives you your original clock back. No extra model, no training, no second checkpoint. If you know DarkSidewalker's Civitai side - the DaSiWa WAN 2.2 and LTX all-in-one workflows - this is that instinct pointed at one narrow problem.

How it actually works

Nothing here is a motion detector in the usual sense. Prepare takes the baseline latent - the packed tensor your frames were decoded from - and computes a jerk profile: the third difference of the latent values, averaged over channels and space. Third difference is the rate of change of acceleration, i.e. "how violently did the picture change direction here". The profile is normalised per token phase so the latent's own 1-4-4-4-4 frame packing bias doesn't get mistaken for motion.

Everything downstream is a threshold on that profile. preset sets the quantile: balanced takes the hottest 25% of tokens and holds them 4x, max quality the top 30% (wider slowed spans, more cost), economy the top 15% at 3x. Valleys up to eight tokens wide between hot peaks get bridged, so one movement doesn't become two slow-mo islands, and hold edges ramp one step per token so the exit doesn't snap. It's ported from MATLOWAI's MAINodes Motion Lab, and the pack pins the hold planning as bit-identical with a test.

Then the plumbing. It repeats each frame as many times as its hold says, VAE-encodes that lengthened batch, and returns a packed H3 latent. Wire audio and the baseline track is stretched onto the slowed clock with a phase vocoder (pitch preserved, not chipmunked) and encoded as the latent's audio half, its denoise mask pinned at 0.5 - the second pass keeps the performance's timing while re-rendering detail around it. That's why lips stay in sync after you drop the frames back out.

The inputs you'll actually touch

  • images and samples are a pair: the decoded baseline frames and the exact latent they came from. No cropped or resized decode.
  • vae is the H3 video VAE for re-encoding. Required.
  • preset is your only real taste knob. frame_rate (default 24) just has to be the clip's real fps - it converts holds into audio sample counts.
  • audio plus audio_vae: optional, and you want them. Half the point of an H3 node is that the second pass knows the dialogue.
  • conditioning is optional and quietly useful - its frame-indexed keyframes move onto the slowed clock, so a first/last-frame pin still lands on the frame Recover keeps. Multi-frame and audio keyframes can't be stretched, so they're dropped and counted. keep_keyframes off drops all of them; that's for continuations, whose keyframes index the sampled clip rather than these frames.

Four outputs. latent goes to your sampler. hold_map is a JSON string and is required by Recover, not optional - wire it. report is a one-line summary ("de-rope balanced: 31 of 121 frames held, 121 -> 168 frames, peak x4") that saves a lot of guessing. conditioning is the remapped version; use it instead of the original.

Wiring and the second pass

baseline sampler LATENT + VAEDecode frames (+ audio)
  -> De-rope Prepare
  -> SamplerCustomAdvanced (BasicScheduler -> SplitSigmasDenoise)
  -> VAEDecode
  -> De-rope Recover  (+ hold_map from Prepare)
  -> Enhanced Video Combine with the ORIGINAL audio

The pass is partial denoise, and the inject fraction is your denoise value. The doc's measured settings: a turbo LoRA at 6 total steps with inject 0.48, or the base model at 25 steps with inject 0.70 for the keeper. The trap worth naming: don't run a turbo LoRA at its full distilled step count in a partial pass - that's how you get a soft, plastic re-render that looks worse than the smear you were fixing.

Install

ComfyUI Manager, search DaSiWa-Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/darksidewalker/ComfyUI-DaSiWa-Nodes
cd ComfyUI-DaSiWa-Nodes
pip install -r requirements.txt

Restart, then look under DaSiWa / MiniMax H3. One caveat: the pack's requirements.txt is sized for the whole collection - nvidia-vfx, llama-cpp-python, transformers, PyAV - while the de-rope pair needs torch and numpy and nothing else. The README's NVIDIA RTX 530+ requirement comes from the RTX video nodes, not this one.

Where people get burned

"De-rope needs the baseline on H3's 17k+5 grid with its own latent." H3 frame counts are 17k+5 and the latent's token count has to match the frames exactly. Resize, crop, interpolate or re-decode through a different path and the pairing breaks. Pass the straight VAEDecode of the latent in samples.

"hold map covers N frames, the batch has M" on Recover means the wrong decode - the slowed one, or one with extra frames. Recover wants the second-pass decode.

Audio crash. The stretch imports torchaudio lazily, and it isn't in the pack's requirements. Most full ComfyUI installs have it; a lean venv passes everything until you connect audio and hits No module named 'torchaudio'.

Runtime sticker shock. Cost scales with the slowed length, not the clip length. A five-second action shot can become ten or thirteen seconds of frames to render.

CategoryDaSiWa/MiniMax H3

Inputs (9)

NameTypeDefaultDescription
imagesIMAGEdecoded baseline frames
samplesLATENTbaseline H3 latent the frames were decoded from
vaeVAE—
presetCOMBObalancedbalanced: q 0.75 x4; max quality: q 0.70 x4 (wider spans); economy: q 0.85 x3 (cheaper)
frame_rateFLOAT24.001–120—
audiooptAUDIObaseline audio; seeds pass 2 so dialogue keeps its timing
audio_vaeoptVAE—
conditioningoptCONDITIONINGgeneration conditioning; its keyframes are moved onto the slowed clock
keep_keyframesoptBOOLEANtrueoff for continuations: their keyframes index the sampled clip, not these frames, so pass 2 runs without them (the init carries their content)

Outputs (4)

NameTypeDescription
latentLATENT—
hold_mapSTRING—
reportSTRING—
conditioningCONDITIONING—