Start Dir To Video Latent ??
Same start-frame injection, but reading from disk so long runs stay low-RAM
- vae
- latent
- latent
- frames_loaded
- report
IAMCCS_StartDirToVideoLatent is the disk-backed twin of StartImagesToVideoLatent. Same job - encode the previous segment's tail frames and inject them into the next segment's latent so the video continues without a seam - but instead of taking an IMAGE batch in memory, it reads the frames from a directory on disk. In a very long extension run, that's the difference between your system RAM slowly filling with carried-over image batches and a loop that churns along at a steady footprint.
It slots into the pack's disk-based extension loop: the source cache gets written once (by SourceFramesToDisk / the extension module), the planner computes each segment, and this node pulls the boundary frames off disk for each iteration. It also reads the directory fresh every run - IS_CHANGED returns nan - so ComfyUI's cache can't serve you stale frames when the folder's contents changed.
How it works
It lists the frame files in start_dir, trims to count frames per mode (all, from_start, from_end), loads them, optionally runs LTXVPreprocess with preprocess_crf (default 33), resizes to the latent's dimensions, encodes with your vae, and splices the encoded frames into the latent at insert_at_pixel_frame, setting a noise_mask weighted by strength (1.0 = locked in place). The mechanics are identical to the IMAGE-input version; only the source differs. Frame files are discovered by extension, so the exact naming convention doesn't matter as long as they sort in order.
Inputs and outputs
- start_dir (default
iamccs_extension_disk/start) - relative to ComfyUI's output folder unless absolute. - vae, latent - as with the image version.
- insert_at_pixel_frame, strength, mode, count, preprocess, preprocess_crf - injection controls.
Outputs: latent, frames_loaded, report.
Installing
ComfyUI Manager → search "IAMCCS", or
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Restart. Requires ComfyUI's native LTXV nodes for preprocessing (it falls back gracefully if missing) and Pillow to load the frames, which ships with ComfyUI.
Gotchas
The whole node collapses if start_dir is empty or points at the wrong folder - the error is a hard ValueError ("No start frames found"), which is at least loud. The typical cause is a relative path that resolved to the output folder instead of where the extension module actually wrote the frames, so use the exact frames_dir output from the writer node rather than retyping the path. And keep the frame ordering convention consistent: from_end takes the last N by sorted filename, so a prefix that changes naming mid-run scrambles which frames you get. Finally, remember frame files on disk are the source of truth here - if you changed the video upstream, clear the cache or the injector happily feeds you the old boundary.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| start_dir | STRING | iamccs_extension_disk/start | Directory containing the start frames for the next segment. |
| vae | VAE | — | |
| latent | LATENT | — | |
| mode | COMBO | all | 3 options: all, from_start, from_end |
| count | INT | 91–512 | — |
| insert_at_pixel_frame | INT | 00–100000 | — |
| strength | FLOAT | 1.000–1 | — |
| preprocess | BOOLEAN | true | — |
| preprocess_crf | INT | 330–100 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| frames_loaded | INT | — |
| report | STRING | — |