Nodes/FxAi(凤希全能节点)/凤希AI - MiniMax二采正向条件
ComfyUI Node

凤希AI - MiniMax二采正向条件

Your H3 keyframes go soft on the second pass — this node re-encodes them

By fxai666·Created 6 months ago·Updated 10 days ago· 43
凤希AI - MiniMax二采正向条件
  • 正向条件
  • 视频VAE
  • AV潜变量
  • 二采正向条件

Two-pass generation is old news for stills: render at native res, latent-upscale, denoise again at low strength, get detail the first pass couldn't afford. Video people now run the same trick on MiniMax H3 - a fast 768p pass, a 2x latent upscale, a short second sample - and it works until your first and last frame anchors turn to mush. That's what 凤希AI - MiniMax二采正向条件 (class FxAiMiniMaxResampleCond) prevents. It isn't a sampler; it rebuilds your keyframe conditioning at the new resolution so the second pass has something sharp to hold.

Why a resolution jump breaks image-to-video anchors

H3 doesn't take your first/last frame as pixels mid-generation. The keyframe image is VAE-encoded into a latent and handed to the model as conditioning rows in a packed layout, next to the video and audio rows. That layout's row count comes from the target latent grid - the size of video you're making - while the keyframe rows are patchified from the keyframe latent's own height and width. Keep those the same and nobody notices. Latent-upscale 2x and they diverge, and divergence in a packed sequence is a shape mismatch: a crash, or in the friendlier case a silently interpolated anchor.

The friendlier case is what this pack ships by default. fxai_minimax_core_patch, imported the moment ComfyUI loads the pack, monkey-patches H3's extra_conds so an undersized keyframe latent gets tri-linearly interpolated up to the layout grid. The author's comment says as much: it's there so that forgetting to wire the second-pass conditioning doesn't blow up your sample. The anchor survives, but it survived a resize in latent space - the exact softness you were avoiding.

What this node actually does

It's three inputs wide, no hidden knobs, and the logic is basically one idea:

  • 正向条件 - the conditioning from the pack's MiniMax图生视频V2 node, the one carrying minimax_keyframes.
  • AV潜变量 - the upscaled AV latent (nested tensor or plain 5D video latent, both accepted).
  • 视频VAE - the same minimax_h3_video_vae_fp16 VAE you encoded the first pass with.

It reads the 5D video tensor and multiplies the two spatial dims by 16 - H3's VAE stride - to recover the pixel size the layout expects. Then, for every keyframe, it grabs the stored original image (image_src, the untouched source), Lanczos-resizes it to that size and runs it back through the VAE. The fresh encode replaces kf["latent"].

Output is one thing: 二采正向条件, a CONDITIONING you feed to the guider of your second SamplerCustomAdvanced. Text embeddings, reference blocks and audio pass through untouched.

Re-encoding a keyframe is a one-frame VAE pass, not a re-render. Crop is inherited per keyframe rather than set here: the first frame stretches to the canvas, the last frame is center-cropped.

Wiring it, and the ways it goes quietly wrong

The pack ships dual-pass workflows (the 双采版 ones, e.g. MiniMax影视剧场双采版V2.json) - use them as the reference: image-to-video V2 → sampler one → upscale latent 2x → FxAiMiniMaxResampleCond on the conditioning → guider two → sampler two.

Where people get burned:

  • No keyframes, no-op. If nothing was wired into 首帧图片 / 尾帧图片 there's no minimax_keyframes to rebuild, and the node returns the conditioning unchanged. No error, no hint.
  • Feeding the wrong latent. Hand it the first-pass AV latent and it happily re-encodes your keyframes at 768p - mismatch back, one VAE encode wasted.
  • A 4D latent raises 二采条件需要 MiniMax H3 的 5D 视频潜变量. H3 only.
  • Reference pictures aren't rebuilt. Only keyframes get re-encoded; entries from 参考图片列表 keep their first-pass latents. Lean on reference images rather than first/last frames and this node does less than the name suggests.

Install

Standard pack install, nothing extra for this node. In ComfyUI Manager search FxAi(凤希全能节点) or just fxai, or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit

Restart ComfyUI. The pack is Chinese-first, so expect Chinese node titles; the class name is the reliable identifier.

A few install realities. There's no requirements.txt; __init__.py pip-installs soundfile and psutil at startup on its own, which fails quietly if your ComfyUI python can't pip. Do it yourself if the log complains:

python -m pip install soundfile psutil

Beyond that it leans on torchaudio, einops and cv2, all of which a normal ComfyUI install has. No model downloads for this node - it borrows the video VAE you already loaded, models/vae/minimax_h3_video_vae_fp16.safetensors.

Troubleshooting

The pack loads nodes one at a time inside a try/except, so one rotten import doesn't kill the rest - but it also doesn't scream. If FxAiMiniMaxResampleCond is missing from the node list, grep your console for [凤希AI] and find the ❌ line for its display name; that's the real error, usually a ComfyUI upgrade that moved something under comfy.ldm.minimax. And since the pack patches core H3 at import (comfy.model_base.MiniMaxH3 and the model's _forward), that patch is active for every H3 generation in your session, not just this node's - update the pack rather than editing it.

And if the second pass still looks murky, it's usually not this node - it's denoise too high or an upscale factor past 2x. H3's second pass is a detail pass, not a second film.

Category凤希AI/MiniMax

Inputs (3)

NameTypeDefaultDescription
正向条件CONDITIONING—
视频VAEVAE—
AV潜变量LATENT—

Outputs (1)

NameTypeDescription
二采正向条件CONDITIONING—