H3 Inject Video Latent (img2img):
H3InjectVideoLatent replaces the video portion of a MiniMax H3 joint audio-video latent with frames encoded from real input images. This makes it possible to use an existing video as an img2img starting point instead of beginning with an entirely empty video latent. The audio portion of the latent is preserved, so audio information already present in the H3 latent remains unchanged while only the video stream is replaced. The node is useful when you want generated motion or visual refinement to retain the structure, composition, and appearance of supplied frames. It is designed to work with H3 workflows that use a full sampling schedule and control denoising strength through the scheduler rather than by truncating sigmas with SplitSigmas. For workflows that also need to preserve or lock audio, pair it with MiniMaxH3NativeAudioLock.
H3 Inject Video Latent (img2img) Input Parameters:
av_latent
This required LATENT input must contain a MiniMax H3 joint audio-video latent, such as the output from MiniMaxH3ReferenceToVideo or EmptyMiniMaxH3LatentAV. The node checks that the latent contains H3’s nested audio-video structure and uses its first stream as the video stream. The video stream is replaced with the VAE-encoded frames from images, while the other streams, including the audio stream, are retained. This input has no configurable minimum, maximum, default value, or selectable options because it must be supplied by another node. A regular, non-H3 latent will produce an error because it does not contain the required nested audio-video structure.
images
This required IMAGE input supplies the real video frames that will be encoded and inserted into the H3 video stream. The node uses the first three color channels of each image, which corresponds to standard RGB image data, and sends them through the selected VAE. The image dimensions must encode to the same latent height and width expected by av_latent; if they do not match, the node stops with a spatial latent mismatch error. There is no source-defined minimum, maximum, default value, or option list. The number of frames should also follow H3’s expected temporal pattern, described in the source as the 17k+5 pixel-frame grid; if the resulting encoded frame count differs from the target, the node automatically trims extra encoded frames or pads missing frames, and reports that adjustment.
vae
This required VAE input determines how the supplied images are converted from pixel images into latent data. The VAE must be compatible with the H3 latent’s spatial encoding so that the resulting latent height and width match the video template in av_latent. There is no source-defined minimum, maximum, default value, or selectable option list. Choosing an incompatible VAE, or using a VAE with image dimensions that do not correspond to the H3 latent, can cause a spatial mismatch or produce results that do not align correctly with the existing video latent.
H3 Inject Video Latent (img2img) Output Parameters:
av_latent
This LATENT output is a copy of the supplied H3 joint audio-video latent with its video stream replaced by the VAE-encoded input frames. The remaining streams are preserved, so the audio stream and other latent members are not replaced by the image encoding. The output is intended to continue into H3 sampling workflows, where it provides a real-frame starting point for img2img-style generation. If the encoded frame count did not match the target latent, the output contains the automatically trimmed or padded video stream, and the accompanying report explains what happened.
report
This STRING output provides a plain-text summary of the injection operation. It reports the shape of the encoded video latent, the number of streams in the joint AV latent, and the input frame count and pixel dimensions. When the encoded temporal length differs from the target, it also includes a warning stating whether frames were trimmed or padded. This report is useful for checking that the image dimensions, frame count, and latent structure match your intended workflow without needing to inspect tensor data manually.
H3 Inject Video Latent (img2img) Usage Tips:
- Create or obtain the H3 joint AV latent with
MiniMaxH3ReferenceToVideoorEmptyMiniMaxH3LatentAVbefore connecting it toav_latent. A standard ComfyUI latent is not sufficient. - Use the same crop canvas and width/height settings that were used to create the H3 latent. The source specifically requires the encoded latent height and width to match the target video latent; mismatches are not automatically resized.
- Supply the actual RGB frames you want to use as the img2img starting point. The node reads the first three image channels, so avoid relying on an alpha channel to carry information into the video latent.
- Match the input frame count to H3’s temporal
17k+5pattern whenever possible. If the count is off, the node will trim or pad the encoded latent, but this may remove frames or fill missing temporal positions rather than preserving a perfectly aligned sequence. - Use
BasicSchedulerto control denoising strength with itsdenoisesetting. The node documentation specifically advises usingdenoiserather thanSplitSigmasfor this workflow, because H3’s flow-matching shift can cause a short truncated schedule to rewrite the supplied frame more strongly than expected. - Keep the audio-related stream intact by pairing this node with
MiniMaxH3NativeAudioLockwhen your workflow requires the original or prepared audio stream to remain locked. - Read the
reportoutput after each run. It confirms the encoded latent shape and clearly identifies temporal trimming or padding that could otherwise be mistaken for a sampling problem. - Use a VAE that is compatible with the H3 workflow and ensure that the image resolution corresponds to the latent resolution expected by the AV latent. Changing the VAE or canvas dimensions may require rebuilding the source H3 latent.
H3 Inject Video Latent (img2img) Common Errors and Solutions:
LATENT is missing "samples".
- Explanation: The connected
av_latentobject does not contain thesamplesdata required by the node. This usually means that the input is not a complete ComfyUI latent object or that an incompatible node output was connected. - Solution: Connect the
LATENToutput of a node that creates a complete latent object, preferablyMiniMaxH3ReferenceToVideoorEmptyMiniMaxH3LatentAV. Do not connect an image, model, conditioning, or other non-latent output.
Expected a MiniMax H3 joint AV latent (NestedTensor). Feed the LATENT output of MiniMaxH3ReferenceToVideo / EmptyMiniMaxH3LatentAV.
- Explanation: The input contains a normal latent rather than the nested joint audio-video latent structure required by H3InjectVideoLatent. The node cannot identify separate H3 streams in that input.
- Solution: Replace the connected latent with the
LATENToutput fromMiniMaxH3ReferenceToVideoorEmptyMiniMaxH3LatentAV. Make sure the workflow is using the MiniMax H3 node family rather than a standard video or image latent.
Spatial latent mismatch: encoded ... but the AV latent expects ...
- Explanation: The VAE-encoded images have a different latent height or width from the video template inside
av_latent. The node does not resize or crop the encoded result to correct this mismatch. - Solution: Make the image crop canvas and H3 width and height settings match. Check both the input image resolution and the VAE used to encode it, then recreate the H3 latent if its target dimensions were configured incorrectly.
WARNING temporal mismatch: encoded t=... vs latent t=... -> trimmed.
- Explanation: The encoded image sequence contains more latent frames than the H3 video stream expects. The node automatically removes frames from the end of the encoded sequence until the lengths match.
- Solution: Adjust the input sequence to the H3 temporal frame pattern before encoding. If trimming is intentional, verify the report and confirm that the removed ending frames are not important.
WARNING temporal mismatch: encoded t=... vs latent t=... -> padded.
- Explanation: The encoded image sequence contains fewer latent frames than the H3 video stream expects. The node fills the missing positions by taking matching values from the existing video template, rather than failing the operation.
- Solution: Provide the complete intended frame sequence and use H3’s
17k+5frame-count pattern. Treat padding as a fallback, because the added temporal positions are not supplied by your source images.
Results have unexpected frame changes despite supplying real images
- Explanation: The node injects the encoded frames, but later sampling can still modify them. Using a short truncated-sigma schedule can be especially unsuitable for this H3 flow-matching workflow because the effective sigma may remain high enough to rewrite the starting frame.
- Solution: Control strength with
BasicSchedulerand itsdenoisesetting, as recommended by the node, instead of usingSplitSigmasto set the strength. Lower denoise values generally preserve more of the injected starting content.
The report shows an unexpected encoded shape or stream count
- Explanation: The shape reflects the VAE output and the structure of the supplied H3 AV latent. An unexpected result may indicate that the image resolution, frame count, VAE, or source latent does not match the intended workflow.
- Solution: Check the report together with the source image dimensions and the H3 latent configuration. Confirm that the VAE is connected correctly, that the input is RGB-compatible, and that the AV latent was created for the same spatial and temporal configuration.
