RepeatLatentBatch_motorway_edition
RepeatLatentBatch from the bus — stack a latent into a batch, by key
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
RepeatLatentBatch is the latent-world version of copy-paste. It takes a latent sample and stacks it amount times into a single batch - same data, just repeated. One latent becomes a batch of four, ready for whatever node insists on seeing four.
It's the utility you reach for when a batch-shaped consumer meets a single-item producer. Some sampling and video nodes assume a minimum batch size, or a specific frame count, and your latent arrives as a lone sample. You repeat it, feed the batch, and the pipeline stops complaining. It's the latent twin of RepeatImageBatch, and like its sibling it does literally nothing else - no resizing, no cropping, no magic.
On the bus
The _motorway_edition version reads its input from the MOTORWAY 🚌💨 bus by key:
INPUT_samples_key(defaultsamples) - the bus key holding the latent to repeat.amount(default 1, range 1–64) - copies to stack. Note the ceiling: latents are memory-hungry, so the node caps you at 64 repeats. If you genuinely need more than that, you're probably doing something unwise.OUTPUT_LATENT_key(defaultLATENT) - where the repeated batch is written back onto the bus.
The only return is the bus; the stacked latents ride inside under LATENT. Keys are case-sensitive and shared by name across the workflow - the sampler may have stored the latent as LATENT or latent_image, so match the key rather than fighting the defaults.
Repetition order is the same as the image version: a batch of 2 repeated 3 times comes out A A A B B B, not A B A B A B. If the consumer cares about ordering, plan upstream.
Install
No dependencies, no models - pure code:
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
or via ComfyUI Manager under the pack title ComfyUI_agilly1989_motorway, then restart.
The fine print
The pack is a self-described beta - "IF THINGS BREAK ITS BECAUSE I BROKE IT" is the README's opening line - and the _motorway_edition clones were auto-generated by a cloner that build 1.1.7 disabled. A fresh install may not include this node; the stock RepeatLatentBatch in core is always there and behaves identically.
Bus failure is the standard KeyError: 'hash_...' doesn't exist in motorway - the key was never stored upstream, usually a name or case mismatch between the producer and your INPUT_samples_key.
And the one real trap with latent repeats is VRAM. Every copy is a full latent tensor in memory, and they add up fast - a 1024×1024 latent batch of 16 is a lot more VRAM than the single latent you started with. If ComfyUI starts OOMing after you bump amount, that's the repeat, not the bus.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_samples_key | STRING | samples | — |
| amount | INT | 11–64 | — |
| OUTPUT_LATENT_key | STRING | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |