Nodes/ComfyUI-MiniMaxH3-Context-Loop/MiniMax H3 Pixel Upscale Conditioning (Experimental)
ComfyUI Node

MiniMax H3 Pixel Upscale Conditioning (Experimental)

Second-pass upscaling conditioning that actually matches your new canvas

By ethanfel·Created 30 days ago·Updated about 19 hours ago· 383
MiniMax H3 Pixel Upscale Conditioning (Experimental)
  • state
  • clip
  • video_vae
  • images
  • tagged_references
  • audio_vae
  • positive
  • images
  • width
  • height
  • compiled_prompt
  • reference_cache_used
  • status
missing_cachetext_only
motion_ref_modeexclude_video_keep_audio
methodbilinear
prompt_override
override_ref_image_sizeinherit
override_reference_policystrict
conditioning_width0
conditioning_height0

Upscaling isn't just "make the pixels bigger" - in this pack's pixel route it's a genuine second diffusion pass, and a second pass has a sneaky failure mode: the reference images and keyframes that steered the first pass were encoded for the old, small canvas. Feed those to the refiner at the new resolution and you get conditioning that's spatially wrong, soft references, or detail that fights the upscale. The MiniMax H3 Pixel Upscale Conditioning node (experimental) exists to fix exactly that, and it fixes it the pragmatic way: it looks at the real dimensions of the upscaled images you give it, instead of guessing from a latent.

You reach for it between an IMAGE upscaler and the refiner. The upscaler produces bigger frames, this node rebuilds the scene's cached references at the target canvas and resizes the remaining eligible conditioning to match, and its outputs feed the guider and the image refiner. No fake latent, no whole-video VAE encode just to measure size - that's the design win here.

How it works

The scene's original pass cached its native Ref2VA reference data (assuming the source pass had cache_for_upscale on). This node restores that cache, re-encodes picture references at the target resolution using your H3 CLIP and video VAE, and synchronizes any remaining match-sized video/keyframe latents to the measured scale_x/scale_y between the upscaled images and the original canvas. Max-sized pictures deliberately keep their capped geometry, and the default motion-reference policy drops reference video while keeping paired audio - motion refs sized for the old canvas rarely survive an upscale usefully.

The one hard rule: your input images must already be H3-aligned - width and height in multiples of 32. There is no silent resize here. If your upscaler produced a fractional size (many do at "2.3x"), align it yourself before this node or it throws.

Inputs that matter

  • images - the actual upscaled RAW frames, before USDU/refinement. Their width/height drive everything. Connect the same images to the image refiner.
  • clip and video_vae - the H3 text encoder and video VAE used to rebuild the cached Ref2VA presentation at pass 2.
  • state - current Upscale state from the adapter.
  • method - interpolation for eligible cached video/keyframe latents; bilinear is the default and fine.
  • motion_ref_mode - exclude_video_keep_audio (default) drops native video refs while keeping paired audio; the other two keep or resize them.

The optional prompt_override is worth knowing: leave blank to reuse the exact compiled generation prompt, or write a concise appearance/detail prompt so pass 2 doesn't re-trigger the original motion and camera instructions. tagged_references lets you override the cached reference line entirely; missing_cache decides whether runs with no matching cache fall back to text-only or hard-error.

Outputs

positive conditioning goes to a fresh Basic Guider for the second pass. images passes your upscaled RAW frames through unchanged to the refiner (in the example flow, USDU). You also get width/height, the actual compiled_prompt, a reference_cache_used boolean, and a status summary of target size, scale, and policy.

How to install

ComfyUI Manager (search "MiniMax H3 Context Loop"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/seitanism/ComfyUI-H3-Motion-Context-MultiRef.git
git clone https://github.com/ethanfel/ComfyUI-MiniMaxH3-Context-Loop.git

Restart ComfyUI. Beyond the two repos and your own H3 model/VAE files, the full example needs the extra external packs (DLSS5 and an H3-aware USDU guider fork) - this conditioning node itself just needs the source run and a CLIP/VAE.

Common issues

The error you'll actually hit is the alignment one: "Pixel target WxH is not H3-aligned." Resize to multiples of 32 before feeding this node, and don't wedge a resize between it and the refiner or the dimensions drift again. It also requires the complete RAW scene - trimmed or interpolated frames get rejected loudly, which beats silently wrong conditioning.

Categoryconditioning/minimax/context_loop/upscale

Inputs (14)

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.
video_vaeVAEOriginal MiniMax H3 video VAE used to re-encode match-sized picture references at the pass-2 canvas. Never use the audio VAE.
imagesIMAGEActual upscaled RAW images BEFORE USDU/refinement. Their width/height drive automatic reference sizing. Connect the same images to the image refiner; no latent encode or guessed scale multiplier is needed.
methodCOMBObilinearInterpolation for eligible cached video/keyframe latents. Match picture refs are rebuilt from RGB masters; max pictures and audio remain unchanged.
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.
conditioning_widthoptINT00–16384Reference-conditioning canvas width. 0 uses the actual image width; a positive multiple of 32 overrides only this axis. Sizes cached or connected match picture refs, not output images or keyframes. Max picture policy remains unchanged. Use a new upscale profile when changing this setting.
conditioning_heightoptINT00–16384Reference-conditioning canvas height. 0 uses the actual image height; a positive multiple of 32 overrides only this axis. Sizes cached or connected match picture refs, not output images or keyframes. Max picture policy remains unchanged. Use a new upscale profile when changing this setting.

Outputs (7)

NameTypeDescription
positiveCONDITIONINGPositive conditioning with automatic or custom reference sizing. Connect to a fresh Basic Guider.
imagesIMAGEUnchanged upscaled RAW images for the pixel refiner.
widthINTMeasured target width.
heightINTMeasured target height.
compiled_promptSTRINGActual encoded pass-2 prompt.
reference_cache_usedBOOLEANWhether an automatic cache was restored.
statusSTRINGActual image size, reference size, scale, cache and motion-reference policy.