Nodes/ComfyUI-SA-Nodes-QQ/Video Prep AB (QQ)
ComfyUI Node

Video Prep AB (QQ)

Build the exact A-to-B transition template your Wan I2V needs

By siraxe·Created 11 months ago·Updated 2 days ago· 72
Video Prep AB (QQ)
  • image_A
  • image_B
  • audio_A
  • audio_B
  • Images
  • audio
  • audio_mask
mid_frames_RGB0,191,0
end_A_frames24
start_B_frames24
total_frames121
video_fps24.0
audio_blend_frames4

The classic Wan image-to-video trick for a transition is brutally simple: feed it the end of clip A, then a bunch of blank frames, then the start of clip B, and let the model animate the gap. The fiddly part is constructing that exact frame sequence with matching dimensions and a clean mid section. VideoPrepAB is that chore in one node: it takes two image sequences, slaps them onto the ends of a solid-color mid block, and hands you a ready-to-condition clip (plus audio, if you want it).

It's part of siraxe/ComfyUI-WanVideoWrapper_QQ, sir_axe's Wan toolpack - the same author behind the TTM physics-integration demo that got 370+ upvotes on r/comfyui. This node is a quiet workhorse that makes those "fade between two scenes" and "interpolation" workflows legible.

How it works

The output sequence is literally end of A + colored mid frames + start of B. It takes the last end_A_frames from image_A and the first start_B_frames from image_B, and fills the middle with total_frames - end_A_frames - start_B_frames frames of a solid color you choose. The mid_frames_RGB string (default "0,191,0" - a green) defines that color as an R,G,B triplet in 0–255. Green is the default for a reason: if you later key it out for a chroma-style composite, it's an easy target.

A few details worth knowing. image_A's resolution is the boss - image_B gets scaled to match on one dimension and cropped on the other, so the output is always uniform. If your arithmetic asks for more mid frames than fit, it clamps the A/B counts proportionally rather than crashing. And the audio path mirrors the video: last bit of audio_A, silence, first bit of audio_B, blended over audio_blend_frames. The audio_mask output is the fade envelope as an image, so you can inspect exactly where the audio crossfade happens.

Inputs and outputs that matter

  • image_A / image_B - your two IMAGE sequences. Order matters: A is the outgoing clip, B is the incoming one.
  • end_A_frames / start_B_frames - how many frames to take from each tail/head (default 24).
  • total_frames - the target output length (default 121 - a clean 5 seconds at 24fps).
  • mid_frames_RGB - the fill color as R,G,B (default 0,191,0).
  • audio_A / audio_B (optional) - AUDIO tensors if you want the audio transition built in.

Outputs: Images (the assembled IMAGE tensor), audio (AUDIO), and audio_mask (IMAGE). Feed Images into whatever conditioning / VAE-encode step your Wan I2V workflow expects.

Installation

cd ComfyUI/custom_nodes
git clone https://github.com/siraxe/ComfyUI-WanVideoWrapper_QQ.git

Restart ComfyUI, or use ComfyUI Manager (search "WanVideoWrapper_QQ"). No special Python deps - the pack's requirements.txt is empty and this node stays in plain torch/PIL territory. If you see duplicate-node warnings, you're probably carrying an old wanwrapper_qq folder from before the pack renamed to ComfyUI-SA-Nodes-QQ in v1.3.4; delete it.

Common issues

The trap is frame arithmetic: with default 24/24/121 you get 73 green frames in the middle, which at 24fps is about three seconds of solid color. That's a lot of empty space for the model to invent - expect the transition to drift if you leave the whole default and don't guide it. Also note the version history: v1.3.8 changed how the mid frames are treated (the fill is now set as an RGB value, not a preset), so a workflow saved against an older release may need the color re-entered. If your two clips have very different resolutions, the crop-to-match behavior means you'll lose some of B's edges - pre-crop B to A's aspect if that matters.

CategoryWanVideoWrapper_QQ/video

Inputs (10)

NameTypeDefaultDescription
image_AIMAGE
image_BIMAGE
mid_frames_RGBSTRING0,191,0
end_A_framesINT240–10000
start_B_framesINT240–10000
total_framesINT1211–993
video_fpsFLOAT24.01–120
audio_blend_framesINT40–1000
audio_AoptAUDIO
audio_BoptAUDIO

Outputs (3)

NameTypeDescription
ImagesIMAGE
audioAUDIO
audio_maskIMAGE