Wan Positioned Ref Gallery
Position reference frames by looking at them, not by typing numbers
- images
- positions
The main node in this pack (WanVaceMultiRefToVideo and its 2.2 sibling) wants a batch of reference images plus a string of frame positions like 20 30 50 90. You can type that by hand. But keeping a mental map of "this ref goes on frame 30, that one on frame 50" across six images is exactly how you get a ref pinned to the wrong frame and a character that suddenly isn't there. WanPositionedRefGallery ("Wan Positioned Ref Gallery") is the visual tool for that job: you drag in the images, preview them live, reorder them, and set each one's frame position right on its card.
What it does
It's the pack's "throw many refs in, preview them, and assign frames" node, per the README. The node renders a proper gallery UI in the ComfyUI canvas:
- Drag-and-drop upload. Drop images onto the node and it uploads them into ComfyUI's
inputdirectory and turns them into refs. - Live preview. A large preview pane shows the selected ref, so you're looking at the actual image while you decide where it goes.
- Left/Right buttons reorder refs; a remove button drops them.
- A frame-position chip on every card - set each ref's timeline position directly, and a "suggest next frame" helper fills in a sensible following position.
Under the hood it's deceptively simple: everything lives in a single gallery_state widget (a multiline JSON string the frontend keeps in sync). On execution it loads each referenced image from the input directory, resizes the batch to match the first image (or crops, depending on resize_mode), and emits two outputs:
images- oneIMAGEbatch of all refs, in card order.positions- aSTRINGof space-separated frame numbers, matching the main node's position format.
Wiring it up
Connect the two outputs straight into the main node:
Wan Positioned Ref Gallery.images→Wan VACE Multi-Ref To Video.positioned_framesWan Positioned Ref Gallery.positions→... .positions_of_positioned_frames
The frame numbers you set in the cards are the same 1-based positions the main node expects, so there's no conversion to think about - that's the point.
Gotchas
- The positions are only as good as the card values. The gallery faithfully emits what's in
gallery_state; it doesn't validate overlaps or out-of-range frames. If you pin two refs to the same frame, the later one in the batch wins. - It reads files from your input directory. The drag-drop upload puts images in
ComfyUI/input, and the node loads them by path on execution. Move or delete the files and the workflow breaks. Re-adding an image to the node from the ComfyUI input folder (not re-dropping the original file) is the reliable habit. resize_mode:match_first(default) stretches every ref to the first image's dimensions;crop_to_firstcrops instead. Stretch can warp non-matching aspect ratios, so if your refs have wildly different shapes,crop_to_firstusually looks better in the result.
It's a convenience node, not a magic one - but for multi-ref work it kills the single most common failure mode, which is mistyping a position. Install via Manager (search "ComfyUI-Tessiiiz-WanVideoToolkit") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Tessiiiz/ComfyUI-Tessiiiz-WanVideoToolkit
Restart ComfyUI, then drag.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| gallery_state | STRING | [] | — |
| resize_mode | COMBO | match_first | 2 options: match_first, crop_to_first |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| positions | STRING | — |