MiniMax H3 Aicg 二采条件
Re-Encode Your Keyframes at the Bigger Size, or the Second Pass Drifts
- h3_context
- second_pass_video_latent
- second_pass_positive
The problem this solves is invisible until it isn't
When you feed H3 a first frame, a last frame, or both, those images get VAE-encoded into latent keyframes and welded into the conditioning at the generation resolution. Fine. Now you upscale the latent 1.5× and run a second sampling pass - and the keyframe latents are still at the old size. H3 has been told "start from this exact frame" in a grid that no longer matches the one you're sampling on.
You don't get a clean error for this. You get a second pass that quietly stops honouring your start frame: the face drifts, the composition loosens, the match to your reference slips. It looks like a denoise problem. It's a resolution problem.
MiniMax H3 Aicg 二采条件 (AICG3D_H3SecondPassConditioning) fixes it. Give it the H3 context and the video-only latent you're about to sample, and it returns conditioning whose keyframes have been resized and re-encoded through the video VAE at the new target resolution - while leaving the text and reference-media conditioning untouched.
How it works
Two inputs, one output, no widgets. That's the whole interface, which tells you the node is meant to be inserted at a specific point rather than tuned.
h3_context(MINIMAX_H3_CONTEXT) - the same context the second pass will sample. It carries the original keyframe sources: the actual images, plus where each one sits on the timeline.second_pass_video_latent(LATENT) - the video-only latent at the second-pass resolution.- Output:
second_pass_positive(CONDITIONING), the rebuilt version to hand to your sampler.
Inside, it derives the target width and height from the latent's spatial shape (latent cells × 16, the VAE downsample factor), then for each keyframe source it resizes the original image with a centre crop and re-encodes it through the context's video VAE. If any resulting latent doesn't match the target grid, it refuses rather than producing a misaligned pass. If the context has no keyframe sources at all - a pure text-to-video run - it returns the conditioning essentially unchanged. That pass-through is correct: there are no keyframes to rebuild.
The conditioning itself is copied and extended rather than mutated, so nothing upstream gets surprised.
The input that catches everyone
second_pass_video_latent must be the 24-channel, video-only, 5-dimensional latent - the one that exists before you concatenate it back into a combined audio/video latent. The node validates all of that and says so:
- not 5D → "must be a video-only LATENT tensor with shape [B, C, T, H, W]"
- not 24 channels → "Connect the 24-channel video LATENT before Concat AV Latent, not the combined AV latent"
So the order of operations in a hand-built two-pass graph is: separate the AV latent, upscale the video half, run this node on that video half, concat, then sample. If you're using AICG-渲染器(二采放大), all of this is already done inside the node and you don't need this one at all - it's built for people assembling the chain themselves.
Where it goes
[pass1 latent] -> Separate AV -> video latent -> Latent 3D upscale --> second_pass_video_latent
[h3_context] -----------------------------------------------------> h3_context
|
AICG3D_H3SecondPassConditioning
|
second_pass_positive -> sampler (conditioning)
Install
cd ComfyUI/custom_nodes
git clone https://github.com/JGRFW/comfyui-AICG3D
Restart ComfyUI; Ctrl+F5 in the browser. Manager route: search AICG3D in the Registry. requirements.txt is just imageio-ffmpeg - nothing extra to install for this node specifically.
What you do need is H3 fully loaded, including the video VAE, because the whole node is a VAE encode at a different size. Missing or mismatched video VAE is the failure that looks like this node's fault and isn't.
Traps
The combined AV latent. The most common mistake by a wide margin. Re-read the channel count: 24 channels means video-only. The concatenated latent has the audio channels appended and will be rejected.
A context from a different render. The keyframe sources live in the context object. If you rebuilt the context from a different prompt or a different reference set, you'll re-encode keyframes that don't belong to the latent you're sampling. Rebuild the working context and run this node off that one.
"The original keyframe source is unavailable." That means the context was assembled before whatever held the source image went out of scope - the pack's advice is to run the H3 node again and feed the fresh context through. Don't try to reconstruct the keyframe by hand.
No keyframes, no change. If your shot was pure text-to-video, the node passes conditioning through untouched. That's not an error; there's simply nothing to reinterpret at the higher resolution.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| h3_context | MINIMAX_H3_CONTEXT | — | |
| second_pass_video_latent | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| second_pass_positive | CONDITIONING | — |