Nodes/XB_ToolBox/XB-BOX - 🎞️ MSR 多图合成帧序列
ComfyUI Node

XB-BOX - 🎞️ MSR 多图合成帧序列

Four images in, one frame sequence out — MSR for short dramas

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB-BOX - 🎞️ MSR 多图合成帧序列
  • img_1
  • img_2
  • img_3
  • img_4
  • background
  • output
width736
height1280
frame_count17
scale_methodlanczos
crop_modecenter

"MSR" here is multi-image synthetic frame sequence, and the job is exactly what it sounds like: you have a handful of still images - say, four panels from a storyboard - and you want a single frame sequence that holds each one on screen long enough to drive an image-to-video or start/end-frame generation. XB_MSR rescales your images to a target resolution, repeats them across a chosen frame count, and hands you one IMAGE batch.

This is a workhorse for short-drama pipelines. The typical use is: your storyboard slicer cut a 4-grid or 9-grid layout into individual panels, and now each panel needs to become a video segment. Feed the four panels in, set width/height, pick a frame_count, and out comes a pre-timed sequence where each image holds for the right number of frames. From there it goes into an i2v node or a video model's start-frame slot.

How it works

The implementation is pure PyTorch, which is worth saying because it means zero external deps and nothing to break. It:

  1. Collects whatever of img_1img_4 and background are actually connected (at least one is required or it raises "至少需要连接一张图片输入").
  2. Rescales every image to your width × height using ComfyUI's common_upscale, honoring the scale_method (lanczos is default) and crop_mode (center or disabled).
  3. Distributes frame_count across the images - each image gets frame_count // len(images) repeats, and any remainder goes to the first images - then concatenates them into one tensor.

The output output is a single IMAGE batch of exactly frame_count frames. It's a sequence, not a video file; wire it into your video generation or save it with a video encoder downstream.

The inputs that matter

  • width / height - target resolution (default 736×1280, stepped in 32s - video-friendly).
  • frame_count - 17, 25, 33, or 41. Note these are all 1+8N counts: LTX and Wan want frame counts that land on that grid, so the four choices aren't arbitrary.
  • scale_method / crop_mode - how images get stretched to fit. lanczos + center is the safe default; switch to area if you're downscaling and want to avoid aliasing.
  • img_1..4, background - the source stills. All optional, but you need at least one connected.

Where it fits

Two common patterns. Pattern one: storyboard panels → MSR → i2v, so each storyboard beat becomes its own clip with the right pacing. Pattern two: start/end-frame video - put your start frame in img_1 and end frame in img_2, set frame_count to your clip length, and you've built the frame sequence a first-last-frame video node can interpolate between.

A note on the remainder logic: if you connect 4 images with frame_count 17, the first image gets 5 repeats and the rest get 4. That's usually fine for pacing, but if you need strict equal distribution, use a frame_count divisible by your image count (17 won't split evenly across 4; 25 will give you one extra on the first).

Install & gotchas

cd ComfyUI/custom_nodes
git clone https://github.com/WJLUOXIAO/XB_ToolBox.git
# or: ComfyUI Manager → "XB_ToolBox"

No extra deps - this is one of the genuinely plug-and-play nodes in the pack. The main way to misuse it is expecting it to animate between images; it doesn't interpolate, it holds. The motion comes from whatever i2v model you feed the sequence into. And if you feed it images of mismatched aspect ratios, center crop will happily chop the edges - that's the crop mode's job, so pick disabled if you'd rather it letterbox.

CategoryXB_ToolBox/Image_Params

Inputs (10)

NameTypeDefaultDescription
widthINT73632–8192
heightINT128032–8192
frame_countCOMBO174 options: 17, 25, 33, 41
scale_methodCOMBOlanczos5 options: lanczos, bilinear, bicubic, nearest-exact, area
crop_modeCOMBOcenter2 options: center, disabled
img_1optIMAGE
img_2optIMAGE
img_3optIMAGE
img_4optIMAGE
backgroundoptIMAGE

Outputs (1)

NameTypeDescription
outputIMAGE