Allegro TextImage2Video Encoder
Pinning your frames into Allegro's timeline
- pipe
- ref_images
- ref_latents
- ref_masks
- frames
- width
- height
Allegro's second mode, added to the pack in January 2025, is "TextImage-to-Video" - the model's name for image-to-video. And AllegroTI2VEncoder is the node that makes it happen, by turning one or more reference images into the exact inputs the TI2V sampler expects: ref_latents and ref_masks. The clever part is what those two outputs represent - the sampler doesn't just "start from" your image, it treats your image as pinned frames that the rest of the video is forced to fit around.
How it works
You feed the node a batch of reference images, a frames count, and - optionally - an indices string. Internally it VAE-encodes your images with Allegro's 3D VAE and runs them through the pipeline's masked-video preparation, which builds:
- ref_latents (
LATENT) - your images VAE-encoded and placed at their assigned frame positions. - ref_masks (
MASK) - a mask marking exactly which latent slices are "owned" by your reference frames (and should stay frozen). - frames / width / height (
INT) - echoed back so you can wire them straight into the sampler's matching inputs.
The reference-count logic is where the flexibility lives, straight from the README:
- One image → used as the starting frame (frame 0).
- Two images → starting frame and ending frame; the video animates between them.
- Multiple images → treated as keyframes for frame interpolation.
The indices string refines the mapping: 0,10,-1 puts your first image at frame 0, the second at frame 10, and the third at the last frame. Leave it empty and the node spaces your images evenly across the timeline (or uses the sensible 0 / 0-and-last defaults for one or two images). To build the multi-image batch in the first place, the README suggests WAS-Suite's Image Batch node to concatenate your reference images.
The inputs that matter
- pipe (
AllegroPIPE) - from LoadAllegroTI2VModel. Required. - ref_images (
IMAGE) - one or more reference images as a batch. Required. - frames (
INT, default 88) - the total video length; your images map onto this timeline. - indices (
STRING, default empty) - custom image→frame mapping, e.g.0,10,-1. - batch (
INT, default 1) - VAE encode batch size; higher is faster, more OOM-prone. - seed (
INT) - for reproducible mask/encoding.
It returns ref_latents, ref_masks, frames, width, height - and in the example TI2V workflow, those last three are wired directly into AllegroTI2VSampler's frames/width/height inputs, so the sampler derives its output resolution from your reference image instead of its widgets. That's a neat detail: the image's resolution becomes the video's resolution.
Install & wiring
cd ComfyUI/custom_nodes
git clone https://github.com/bombax-xiaoice/ComfyUI-Allegro
cd ComfyUI-Allegro && pip install -r requirements.txt
Then: LoadAllegroTI2VModel → this encoder + AllegroTextEncoder → AllegroTI2VSampler → AllegroDecoder → save node.
Common issues
The main trap is feeding the images as separate single-image batches instead of one combined batch - the node interprets the batch's number of images as its keyframe count, so one image per batch "works" but gives you one pinned frame. Concatenate your references first. Also keep your reference images near 1280×720 (or whatever your target is), because the encoder hands its resolution to the sampler - a tiny square reference will happily produce a tiny square video.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| pipe | AllegroPIPE | — | |
| ref_images | IMAGE | — | |
| frames | INT | 88 | — |
| indices | STRING | — | |
| batch | INT | 11–16 | — |
| seed | INT | 0 | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| ref_latents | LATENT | — |
| ref_masks | MASK | — |
| frames | INT | — |
| width | INT | — |
| height | INT | — |