Nodes/IAMCCS-nodes/MiniMax H3 R38 Target Conditioning
ComfyUI Node

MiniMax H3 R38 Target Conditioning

A second encode, or a smart reuse

By IAMCCS·Created 11 months ago·Updated a day ago· 113
MiniMax H3 R38 Target Conditioning
  • 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
segment_index
target_width
target_height
render_id

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_height come as forceInput from the Control node's stage_width/stage_height outputs. 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.
CategoryIAMCCS/MiniMax H3/Latent Upres R38

Inputs (22)

NameTypeDefaultDescription
modelMODEL
clipCLIP
video_vaeVAE
audio_vaeVAE
cine_linxIAMCCS_SUPERNODE_LINX
segment_indexINT
target_widthINT
target_heightINT
stage1_conditioningoptCONDITIONING
bridge_frameoptIMAGE
render_idoptSTRING
first_frame_overrideoptIMAGE
last_frame_overrideoptIMAGE
ref_image_1optIMAGE
ref_image_2optIMAGE
ref_image_3optIMAGE
ref_image_4optIMAGE
ref_videooptIMAGE
ref_video_audiooptAUDIO
ref_audiooptAUDIO
stage1_latentoptLATENT
stage1_motion_stateoptIAMCCS_H3_MOTION_CONTEXT

Outputs (3)

NameTypeDescription
conditioningCONDITIONING
target_latentLATENT
reportSTRING