Nodes/Vantage-Nodes/Append Latent Batch
ComfyUI Node

Append Latent Batch

Grow a latent batch one chunk at a time — the accumulator node

By vantagewithai·Created 8 months ago·Updated 25 days ago· 25
Append Latent Batch
  • base
  • append
  • latent
  • batch_count

JoinLatentBatch merges two batches once. This node is its loop-friendly sibling: it appends one batch onto another and hands the combined result back, so you can feed its own output back into its base input and accumulate latents across iterations. It's the "build a growing batch" node for iterative workflows.

The naming difference matters. base is the thing you're accumulating into; append is the new chunk. Every run of the node returns the whole running total plus its count, so in a graph that loops or feeds chunks in over time, each pass hands the previous result forward with the new batch bolted on.

What it needs

  • base - the running latent batch (optional). None is fine on the first pass: if base is None and append exists, you get append back.
  • append - the new chunk (optional). None is fine too: base passes through untouched.

Two outputs: latent (the accumulated batch) and batch_count (its current size).

Like its join sibling, it enforces matching spatial shape (C/H/W) and errors on a mismatch rather than doing anything clever. Also like its sibling, metadata from the base carries through, so you're not losing latent extras as you accumulate.

When you'd use it

The honest answer: less often than you think, and more often than you'd guess. ComfyUI's graph doesn't do true loops - most "iterative" work is really unrolled, with each step being its own copy of a node. Where Append earns its keep is in patterns that genuinely feed chunks back, and in workflow authoring where you want one node to represent "keep adding to this pile" so the graph reads clearly.

Pair it with a batch count consumer and it's also a convenient progress/state check: wire batch_count to anything that wants to know how many samples you've collected. For the one-shot "merge two batches and be done" case, JoinLatentBatch is the more direct pick; this node is for the accumulate-over-time framing of the same operation.

Install

Part of Vantage-Nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/vantagewithai/Vantage-Nodes.git
pip install -r requirements.txt

or ComfyUI Manager → search "Vantage-Nodes" → Install → restart.

Common issues

  • "Latent shape mismatch" - same cause as Join: spatial shapes differ. Keep the chunks the same resolution.
  • Batch keeps growing past what you expected - that's the design. If a downstream sampler has a max batch, watch the count output and gate the append.
  • Accumulating different model outputs - joining latents from different checkpoints/VAEs into one batch can decode oddly; keep provenance consistent.
CategoryVantage/Latent

Inputs (2)

NameTypeDefaultDescription
baseoptLATENT
appendoptLATENT

Outputs (2)

NameTypeDescription
latentLATENT
batch_countINT