APNext QwenVL Frame Prep
Prep up to five frames for QwenVL Next Scene in one small node
- image_1
- image_2
- image_3
- image_4
- image_5
- image_batch
- images
- frame_count
A genuinely thin utility node, and that's a compliment. QwenVL Frame Prep's one job is to get your frames into the shape the QwenVL Next Scene node expects: it takes up to five individual images (or one pre-batched image_batch), scales each one down so it fits inside your chosen maximum dimensions, keeps the aspect ratio, and outputs them as a single batched images tensor plus a frame_count integer. That's the entire spec, and it's exactly what makes Next Scene usable.
You'll typically wire it like this: Load Image → Frame Prep → QwenVL Next Scene. Load Image gives you one frame at a time, and Next Scene wants a batch of 1–5 frames to understand motion and progression across a sequence. Frame Prep is the bridge - it also quietly normalizes wildly different frame sizes (a storyboard where frame 1 is 4K and frame 3 is 512px) to something the vision model can process without you manually resizing each one.
The inputs that matter
max_width/max_height- both default to 1024, and only ever downscale (an image smaller than the cap is left alone). 1024 is a sensible default for a 2B–8B vision model; there's rarely a reason to go above it for description purposes.image_1…image_5- the individual frames.image_batch(optional) - connect a pre-batched IMAGE here instead if your pipeline already produces one.
Outputs are images (the batched tensor - this is what you wire into Next Scene's images input) and frame_count (how many frames ended up in the batch, handy if you want to log or branch on it). It doesn't think, it doesn't ask an LLM anything, and it doesn't download a model - this node is pure Pillow + tensor math.
Install
Standard pack install - ComfyUI Manager (search "comfyui_dagthomas") or:
cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt
Then restart. No keys, no models, no heavy dependencies - if the pack is installed, this node is working.
Common issues
- Next Scene only sees one frame - check you're reading
images(the batch) into Next Scene'simagesinput, not just a single image slot. frame_countsays fewer than you attached - an image smaller than the caps is kept, not dropped; if something's missing, check you haven't connected the same slot twice.image_batchplus individual images both count.- Images look oddly small downstream - that's the downscale doing its job; the vision model reads them fine at 1024px, and the Next Scene node only needs enough detail to understand the scene, not to render it.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| max_width | INT | 1024256–2048 | — |
| max_height | INT | 1024256–2048 | — |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| image_5opt | IMAGE | — | |
| image_batchopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| frame_count | INT | — |