Nodes/ComfyUI-MiniMaxH3-Contex-Loop/MiniMax H3 Upscale Reference Conditioning
ComfyUI Node

MiniMax H3 Upscale Reference Conditioning

Rebuild MiniMax H3's pass-2 conditioning from the checkpoint cache, no original wires needed

By ethanfel·Created 17 days ago·Updated about 20 hours ago· 315
MiniMax H3 Upscale Reference Conditioning
  • state
  • clip
  • target_video_latent
  • video_vae
  • tagged_references
  • audio_vae
  • positive
  • compiled_prompt
  • reference_cache_used
  • status
missing_cachetext_only
motion_ref_modeexclude_video_keep_audio
prompt_override
override_ref_image_sizeinherit
override_reference_policystrict

This is the node that makes the deferred upscale loop work with references instead of despite them. When you upscale a scene that was originally generated with picture or video references, you have a problem: the pass-2 (upscale) render runs in a completely separate child loop, with no Source Timeline and no original reference-media wires. Naively, your upscaled scene would either drop the references entirely or require you to re-wire everything by hand. Upscale Reference Conditioning solves it by restoring a scene-local reference payload automatically from the checkpoint fingerprint, or by accepting a connected pass-2 Tagged Ref line as a replacement.

The README explains the trick behind it: Tagged and Scheduled Ref2VA cache each active scene's native reference latents and compact Qwen presentation as part of the checkpoint. This node finds that cache using only the selected source branch, scene, prompt, and generation fingerprint from the upscale state - no Plan, no Source Timeline wiring required. It's the "remember what this scene referenced" node.

The inputs that matter

  • state - the current Upscale state; the node uses only the selected source branch, scene, prompt, and fingerprint to discover refs.
  • clip - the MiniMax H3 text encoder, needed to rebuild the cached Ref2VA presentation at pass 2.
  • missing_cache - what to do when no matching cache exists: text_only keeps non-reference and older runs usable; error demands the exact automatic cache. Default text_only is the right call for a mixed production.
  • motion_ref_mode - the pass-2 motion-reference policy: default exclude_video_keep_audio strips both the native video-ref latents and their Qwen presentation while keeping paired audio (sensible - you're upscaling detail, not re-running motion); keep_video_native keeps them; resize_video is the middle option.

The optional target_video_latent plus video_vae is the resolution-aware part: when you connect the actual 24-channel pass-2 video latent and the video VAE, match-sized picture refs and their Qwen presentation are rebuilt for the exact pass-2 canvas - so references scale correctly instead of being pasted at the wrong resolution. The tooltip's warning is worth repeating: never use the audio VAE here. prompt_override replaces the compiled generation prompt with a concise appearance/detail prompt (blank reuses the exact original), and a connected tagged_references line replaces the cached payload entirely.

Outputs: positive (the pass-2 conditioning), compiled_prompt (what was actually encoded), reference_cache_used (true only when the automatic cache was used - live refs report False even though their conditioning is active), and status.

Install

From ComfyUI-MiniMaxH3-Contex-Loop. ComfyUI Manager → search the pack, or:

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

Restart. No pip deps; current ComfyUI with native Add Guide for MiniMax H3 expected; H3 weights not bundled (geofenced out of the US/EU/UK/South Korea under the Community License).

Gotchas

The cache is the whole trick, and caches can be absent. If you generated a run before the caching landed, or with a reference path that was never tagged, missing_cache: text_only keeps you running but your pass-2 conditioning has no pictures - which is fine for pure detail upscaling and wrong for "keep the same subject." And when you do connect the video VAE, remember the "never the audio VAE" rule; a swapped VAE produces conditioning garbage that's hard to diagnose later.

Categoryconditioning/minimax/contex_loop/upscale

Inputs (11)

NameTypeDefaultDescription
stateH3_CHAIN_UPSCALE_STATECurrent Upscale state. The node uses only the selected source branch, scene, prompt, and generation fingerprint to discover refs.
clipCLIPMiniMax H3 text encoder used to rebuild the cached Ref2VA presentation at pass 2.
missing_cacheCOMBOtext_onlytext_only keeps non-reference and older runs usable when no matching cache exists. error requires the exact automatic Ref2VA cache.
motion_ref_modeCOMBOexclude_video_keep_audioPass-2 motion-reference policy. The default removes both native video-ref latents and their Qwen presentation, while keeping paired audio.
target_video_latentoptLATENTActual 24-channel pass-2 video latent. When connected with video_vae, match-sized picture refs and their Qwen presentation are rebuilt for its exact H3 canvas.
video_vaeoptVAEOriginal MiniMax H3 video VAE used to re-encode match-sized picture references at the pass-2 canvas. Never use the audio VAE.
prompt_overrideoptSTRINGOptional pass-2 text prompt. Blank reuses the exact compiled generation prompt. Use a concise appearance/detail prompt to avoid repeating source motion or camera instructions.
tagged_referencesoptH3_TAGGED_REFERENCESOptional pass-2 Tagged Ref line from Upscale Reference + Prompt Override. When connected, it replaces the cached reference payload and is compiled with prompt_override.
audio_vaeoptVAEMiniMax H3 audio VAE. It is needed only when the connected override registry activates standalone or paired reference audio.
override_ref_image_sizeoptCOMBOinheritPicture sizing for connected override refs. inherit uses the source cache's match/max policy when available, otherwise match.
override_reference_policyoptCOMBOstrictPrompt/tag validation for connected pass-2 Tagged refs.

Outputs (4)

NameTypeDescription
positiveCONDITIONINGPass-2 H3 conditioning rebuilt from cached or explicitly connected Ref2VA media. Match pictures remain canvas-aware and motion video follows motion_ref_mode.
compiled_promptSTRINGPrompt actually encoded for pass 2: custom override, exact cached compiled prompt, or saved source prompt.
reference_cache_usedBOOLEANTrue only when the automatic cache was used; connected live refs report False even though their conditioning is active.
statusSTRINGScene-local cache lookup result and fingerprint summary.