MiniMax H3 R38 Target Conditioning
A second encode, or a smart reuse
- model
- clip
- video_vae
- audio_vae
- cine_linx
- stage1_conditioning
- bridge_frame
- first_frame_override
- last_frame_override
- ref_image_1
- ref_image_2
- ref_image_3
- ref_image_4
- ref_video
- ref_video_audio
- ref_audio
- stage1_latent
- stage1_motion_state
- conditioning
- target_latent
- report
When you upscale a latent and refine it, the conditioning has to match the new resolution - a conditioning built for the native 768p latent isn't quite right for the 1440p stage latent you're now sampling. This R38 node produces the target-resolution conditioning and the target latent for the stage-2 pass.
But here's where it gets smart instead of just correct: for long-form motion-context shots it often doesn't re-encode at all. If the shot is running longvid_motion_context (or a native motion context is active) and you already have stage-1 conditioning plus a stage-1 latent, the node returns those directly and lets MiniMax H3 handle the internal resize. The report literally says "no second Qwen encode". For a pipeline where a text encode on a big omni encoder is expensive, skipping a redundant encode on every refine pass is a real saving - and it's the kind of branch you'd never notice from the outside because the node just quietly returns the right thing either way.
How it works (full path)
When it does need fresh conditioning, it builds a modified copy of the shot plan at the target target_width/target_height (with upscale disabled so the conditioning isn't recursively planning an upscale), and delegates to IAMCCS's atomic conditioning backend with all the reference inputs - bridge frame, first/last frame overrides, reference images/videos and their audio. The result is the positive conditioning and the target latent at the right size.
Inputs that matter
Required: model, clip, video_vae, audio_vae, cine_linx, segment_index, target_width, target_height.
Optional - most of these are reference media for the conditioning encode: stage1_conditioning, stage1_latent, stage1_motion_state (the reuse path), bridge_frame, render_id, first_frame_override, last_frame_override, ref_image_1..4, ref_video, ref_video_audio, ref_audio.
Practical note: if you're feeding reference images, this is where they arrive for the refine pass. The four ref_image slots plus a ref video give the conditioning context for characters/style continuity at the higher res.
Outputs
conditioning- target-resolution positive conditioning for stage 2.target_latent- the upscaled latent at target size, ready for the refine sampler.report- tells you which path ran ("mode_matched_target_conditioning" vs "stage1_motion_context_conditioning") and the target size.
Install
Pack install (ComfyUI Manager → IAMCCS, or git clone https://github.com/IAMCCS/IAMCCS-nodes.git), plus MiniMax H3 support and, for the real encode path, whatever the atomic conditioning backend needs (CLIP/text encoder - often the exact ClipProj loader's output).
Gotchas
target_width/target_heightcome as forceInput from the Control node'sstage_width/stage_heightoutputs. Don't free-type them; wire them.- On the reuse path, if you want different reference media at stage 2 you have to disable the reuse - the node prefers continuity over your new refs when motion context is active, by design.
- It returns conditioning + latent, not a sampled video. The refine sampler and downstream sampler do the actual work.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| video_vae | VAE | — | |
| audio_vae | VAE | — | |
| cine_linx | IAMCCS_SUPERNODE_LINX | — | |
| segment_index | INT | — | |
| target_width | INT | — | |
| target_height | INT | — | |
| stage1_conditioningopt | CONDITIONING | — | |
| bridge_frameopt | IMAGE | — | |
| render_idopt | STRING | — | |
| first_frame_overrideopt | IMAGE | — | |
| last_frame_overrideopt | IMAGE | — | |
| ref_image_1opt | IMAGE | — | |
| ref_image_2opt | IMAGE | — | |
| ref_image_3opt | IMAGE | — | |
| ref_image_4opt | IMAGE | — | |
| ref_videoopt | IMAGE | — | |
| ref_video_audioopt | AUDIO | — | |
| ref_audioopt | AUDIO | — | |
| stage1_latentopt | LATENT | — | |
| stage1_motion_stateopt | IAMCCS_H3_MOTION_CONTEXT | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| target_latent | LATENT | — |
| report | STRING | — |