Nodes/ComfyUI-MiniMaxH3-Context-Loop/H3 Conditioning Sync From Latents
ComfyUI Node

H3 Conditioning Sync From Latents

The node that rescales your reference images to match an upscaled H3 render

By ethanfel·Created about a month ago·Updated about 7 hours ago· 422
H3 Conditioning Sync From Latents
  • original_latent
  • upscaled_latent
  • positive
  • negative
  • positive
  • negative
  • width
  • height
  • scale_x
  • scale_y
methodbilinear
motion_ref_modeconditioning_policy

H3 Conditioning Sync From Latents is the little compatibility shim that makes a deferred H3 upscale chain work without rerunning your reference pipeline. It's the kind of node you'll never touch during a first render and absolutely need the moment you try to upscale a scene - and it exists because upscaling a latent quietly invalidates every reference image you conditioned against.

Here's the situation. In the main chain you render at 960×544 (or whatever your Plan says) and condition with picture refs, keyframes and motion video. When you then run a second pass - the bundled Deferred Upscale + De-Rope workflow, say - the upscaled latent is a different pixel size, and often a different latent size, than the original. Feed the same conditioning back in and your minimax_refs and minimax_keyframes are now misaligned with the canvas. This node fixes exactly that.

How it works

You give it three things: the original latent (original_latent), the upscaled latent whose X/Y scale is the ground truth (upscaled_latent), and the original positive conditioning. It compares the two latents, computes the exact horizontal and vertical scale, and resizes the match-sized picture references and keyframes to line up with the new canvas. method picks the interpolation - bilinear is the default and the one you'll almost never change.

Two things it deliberately does not touch are worth knowing, because they stop you over-thinking it:

  • Max-sized pictures stay at their core-defined geometry, since H3 caps those anyway. Resizing them would be pointless.
  • Reference time and audio conditioning pass through untouched. The positive output is conditioning you can hand straight to a fresh Guider for pass 2 - the tooltips hammer this: build a new Guider from the returned conditioning rather than reusing the old one.

The motion_ref_mode enum is where the actual thinking happens. The default conditioning_policy just follows whatever the "Upscale Reference Conditioning" node decided, which is normally exclude_video_keep_audio - the pass-2 source latent already contains the generated motion, so the motion video presentation is dropped and a video-paired audio reference becomes audio-only. The explicit modes (keep_video_native, resize_video) exist for standalone A/B use. Leave it on conditioning_policy until you have a reason not to.

There's an optional negative input; if you connected one for the original render, connect it here too and it gets synchronized by the same scale. Outputs width, height, scale_x and scale_y are just diagnostics - handy if you're wiring an adaptive value elsewhere, but you normally ignore them.

Where it sits in the upscale graph

This is a pass-2 conditioning node, so it lives in the child upscale loop, not the main chain: the upscaled scene latent → this node → new Guider → sampler. One thing to note: a de-rope target may run a longer time axis than the original scene (de-roping re-times frames). Sync accepts that - it only cares about spatial geometry, and only the batch/video channels need to match.

Installing it

It ships in ComfyUI-MiniMaxH3-Contex-Loop. In ComfyUI Manager search "MiniMax H3 Contex Loop" and install, or clone manually from ComfyUI/custom_nodes:

git clone https://github.com/ethanfel/ComfyUI-MiniMaxH3-Contex-Loop.git

Restart ComfyUI. No models are bundled - you still need the MiniMax H3 weights (the MiniMaxAI/MiniMax-H3 repo on Hugging Face; mind the territory license, which excludes the US, EU, UK and South Korea). The node also needs a ComfyUI build with native Add Guide for MiniMax H3 (PR #15439).

Common issues

The most common failure is feeding it the wrong latents - pass the pre-upscale original as original_latent, not the source scene's sampled latent, or the scale math comes out wrong. And if your pass-2 colors look off because references were double-scaled, check that pictures rebuilt from a cache-v2 RGB master at the pass-2 canvas aren't being resized again; sync is meant to leave those alone. When in doubt, leave the defaults, connect positive and negative, and rebuild your Guider from the outputs.

Categoryconditioning/minimax/context_loop/upscale

Inputs (6)

NameTypeDefaultDescription
original_latentLATENTOriginal-resolution 24-channel H3 video latent whose conditioning will be synchronized. Its time may differ from a de-rope target.
upscaled_latentLATENTUpscaled 24-channel H3 video latent. Its exact X/Y scale drives the conditioning resize; a dilated de-rope time axis is supported.
positiveCONDITIONINGOriginal H3 conditioning containing minimax_refs and/or minimax_keyframes. Cached max pictures remain at their core-defined geometry.
methodCOMBObilinearSpatial interpolation used for match-sized picture refs, eligible video refs, and keyframe latents. Max pictures, time, and audio are unchanged.
motion_ref_modeCOMBOconditioning_policyconditioning_policy automatically follows Upscale Reference Conditioning. Explicit modes are available for standalone/A-B use.
negativeoptCONDITIONINGOptional negative conditioning. Use the returned negative when rebuilding a CFG Guider.

Outputs (6)

NameTypeDescription
positiveCONDITIONINGPositive conditioning with visual refs/keyframes synchronized to the upscaled latent.
negativeCONDITIONINGNegative conditioning synchronized by the same scale, when connected.
widthINTUpscaled video width in pixels.
heightINTUpscaled video height in pixels.
scale_xFLOATExact horizontal latent scale.
scale_yFLOATExact vertical latent scale.