ComfyUI Node

WanCutLastSlot

The one-input trim that saves your stitch

By Well-Made·Created 6 months ago·Updated 4 months ago· 84
WanCutLastSlot
  • latents
  • trimmed_latents
slots_to_cut1

WanCutLastSlot is the smallest node in this pack and the one that keeps the whole thing from falling apart. It trims temporal slots off the end of a Wan video latent. That sounds like busywork until you understand the bug it exists to work around.

The pack's main node (WanImageToVideoSVIProFLF) does two things to the end of every segment: it hard-locks the last slots to your end_samples (FLF-style), and at the same time SVI Pro logic tries to steer the motion trajectory through that same slot on the next segment. Two behaviors fighting over the same frames is exactly as bad as it sounds - you get heavy artifacts, "crumpled" frames, precisely at the hard-locked end. The author's fix is brutally simple: drop that last temporal slot entirely before the segment becomes prev_samples for the next one. That's the entire job of this node.

How it works

In Wan 2.2 one temporal slot corresponds to 4 frames (stride 4), so cutting one slot removes roughly the last 4 frames of latent information. The node takes your latent dict, keeps everything except the last slots_to_cut slots along the T dimension, and returns the same structure, shorter. Two inputs, one output, no state:

  • latents - your Wan video latents ({"samples": [B, C, T, H, W]}).
  • slots_to_cut - how many slots to remove, default 1, max 64. The node always preserves at least one slot, so you can't zero out the whole clip by accident.

Output is trimmed_latents, same shape minus the cut slots. In a stitching workflow it sits between a segment's generation and the next segment's prev_samples input - sample a segment, cut one slot, feed the result forward.

Installing it

Same pack, same install. ComfyUI Manager (search Wan-SVI2Pro-FLF) or:

cd ComfyUI/custom_nodes
git clone https://github.com/Well-Made/ComfyUI-Wan-SVI2Pro-FLF.git

Restart ComfyUI and it shows up under latent/video. No extra Python dependencies - the pack ships zero requirements.

Practical notes

Start with slots_to_cut = 1 and don't get clever. Cutting more eats real frames of motion, and if you over-cut, the next segment's continuity tail no longer reaches back to where the motion actually ended, so you trade artifacts for a visible jump. One slot is the sweet spot the workflows were built around.

The README is refreshingly honest that this is a pragmatic workaround, not a theoretical solution - the author explicitly invites a cleaner way to reconcile SVI motion with hard-locked end slots. That means you should think of the node as part of the pack's opinion about how to stitch segments, not as a general-purpose video tool. Grabbing it standalone to trim latents for other purposes works mechanically, but it only earns its keep inside this stitching pattern.

Worth knowing: the pack went through a couple of quick revisions in Feb 2026 (the end-samples input became optional, then a toggle was added). If you're mid-project on an older checkout, git pull and restart - the last-frame bug fix alone is worth it, and this trim node is what makes the whole chain stable afterward.

Categorylatent/video

Inputs (2)

NameTypeDefaultDescription
latentsLATENTWan video latents to trim (dict with 'samples' key, shape [B,C,T,H,W]). The last temporal slots will be removed.
slots_to_cutINT11–64How many last temporal slots (T dimension) to cut. In Wan 2.2, 1 slot ≈ 4 frames.

Outputs (1)

NameTypeDescription
trimmed_latentsLATENT