Merge Mesh Sequences
The tiny utility that stitches your VRAM-limited runs back together
- sequence_1
- sequence_2
- merged_sequence
MergeMeshSequences is the most boring node in this pack and, for anyone not running a 24GB+ card, one of the most useful. It takes two TRELLIS_MESH_SEQUENCE outputs and joins them into one - which sounds pointless until you've tried to run VideoToMeshes over a long clip and watched it die of CUDA memory exhaustion somewhere around frame 40.
That's the workflow it exists for. Split your video into chunks, run VideoToMeshes on each chunk (each with its own max_frames), then merge the results back into a single sequence before handing it to MeshSequenceRenderer. Processing in chunks keeps peak VRAM flat, and this node makes the seam invisible.
How it works
The merge is deliberate about ordering. It concatenates the two sequences' mesh lists along with their frame_indices, then sorts everything by original frame index - so the merged sequence is guaranteed to be in timeline order no matter which order you processed or wired the chunks. The output's total_frames is taken as the max of the two inputs, so downstream renderers know the true length of the source clip.
That's the whole mechanism. Two inputs in, one merged_sequence out, no settings to fiddle with - there isn't a single parameter on this node.
Inputs and output
- sequence_1 / sequence_2 - the two
TRELLIS_MESH_SEQUENCEvalues from VideoToMeshes. Order doesn't matter (it sorts by frame index), but each one must actually carry itsframe_indices- which the batch node always attaches. - Output: merged_sequence - a
TRELLIS_MESH_SEQUENCEthat behaves exactly like a single VideoToMeshes result, ready for MeshSequenceRenderer.
One honest limitation: it's binary, not n-ary. If you're splitting a clip into three chunks you need to chain merges (merge chunk A+B, then merge that with chunk C), which is a slightly awkward graph but works fine.
Installing
Nothing special - it ships with the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/styletransfer/ComfyUI-TRELLIS2_Motion
cd ComfyUI-TRELLIS2_Motion
python install.py --full
pip install git+https://github.com/microsoft/TRELLIS.git
pip install git+https://github.com/NVlabs/nvdiffrast.git
Restart ComfyUI; it appears under TRELLIS2/Video.
Common issues
- Merged sequence looks shorter than expected. If one chunk processed fewer frames than the other (say it hit
max_framesor skipped failed frames), the merge just contains what it got - it doesn't pad. The sorted result is correct, it's just not the length you hoped. Check each VideoToMeshes actually finished all its frames. - "KeyError" style failures when merging. The node expects the full sequence dict shape (meshes + frame_indices + total_frames). If a sequence came from something other than VideoToMeshes, there's no guarantee it has those keys - keep the inputs fed from the batch node and you're safe.
It won't win any awards, but when a render is on the verge of OOM, a couple of merged chunks is a lot friendlier than re-running the whole pipeline. That's its job, and it does it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| sequence_1 | TRELLIS_MESH_SEQUENCE | First mesh sequence | |
| sequence_2 | TRELLIS_MESH_SEQUENCE | Second mesh sequence |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| merged_sequence | TRELLIS_MESH_SEQUENCE | — |