Nodes/fxai-toolkit/凤希AI - 潜空间获取
ComfyUI Node

凤希AI - 潜空间获取

Pull a single frame out of a latent without decoding anything

By fxai666·Created 4 months ago·Updated 4 days ago· 35
凤希AI - 潜空间获取
  • 潜空间序列
  • LATENT
起始索引-1
长度1

FxAiLatentGetFrames (凤希AI - 潜空间获取) is the tiny but quietly essential frame-slicer in the fxai-toolkit long-video workflow. Video latents are five-dimensional tensors - batch, channels, time, height, width - and the whole "generate a long clip on a low-VRAM card" trick is to stop treating that time axis as one giant object. This node lets you grab a slice of frames out of a latent sequence before any VAE decode, so the frames you hand to the next loop iteration are tiny instead of decoded into a stack of full-resolution images. That's the difference between looping on a 12GB card and OOMing on step one.

It's a pure slicing node. Feed it a 潜空间序列 (LATENT), pick a 起始索引 (default -1, which conveniently means "the last frame" - a much friendlier default than most tools give you), and a 长度. Positive length slices forward from the start index; negative length slices backward. The frame count comes from the batch/time dimension and everything is clamped to safe bounds, so you can't slice past the end and crash the graph. It clones the samples first, which means the original latent isn't mutated for anything else wired off the same output.

The thing to actually set is the 长度: 1 gets you one frame, which is what you want when you're grabbing "the last frame of this segment" to carry into the next loop as the continuity anchor. That one-frame latent is exactly the ref_latent that sibling nodes like FxAiLTX23Sampler consume for person/ID anchoring. Grab more than one and you're feeding a mini-sequence into whatever sampler you're chaining.

Install is the whole-pack story: ComfyUI Manager, search "fxai-toolkit", or cd ComfyUI/custom_nodes && git clone https://github.com/fxai666/fxai-toolkit and restart. The pack auto-installs soundfile and psutil at startup and needs FFmpeg on PATH for its audio paths. One heads-up that catches people off guard: every label in this pack is Chinese, so you'll be looking at 潜空间序列, 起始索引, and 长度 in the UI. That's not a bug, it's the design - the pack is built by 凤希AI for a Chinese-speaking community (QQ group 775649071, Bilibili space.bilibili.com/1242183138), and there's no English Reddit presence to lean on for help.

Troubleshooting is mostly "did you wire the right output." This node outputs a LATENT, so it plugs into samplers, VAE decoders, and other latent-consuming nodes - it does not output an image you can look at. If you expect to see a picture, decode it first. The other common stumble is feeding it the output of a sampler that already shaped the latent with a noise mask or extra metadata; the clone keeps what's there, it only trims the frame axis. Keep it between your previous segment's sampler and your next segment's ref input and you'll never think about it again - which is exactly what a good plumbing node should be.

Category凤希AI/工具

Inputs (3)

NameTypeDefaultDescription
潜空间序列LATENT
起始索引INT-1-1–9999
长度INT1-9999–9999

Outputs (1)

NameTypeDescription
LATENTLATENT