ComfyUI Node

Play (Start)

The node that turns a script tree into a renderable video loop

By wgedeon·Created 12 months ago·Updated 10 months ago· 2
Play (Start)
  • model
  • clip
  • vae
  • data
  • act_1
  • act_2
  • flow
  • sequence_batches
  • data
  • model
  • clip
  • vae
  • play_current
  • act_current
  • scene_current
  • beat_current
  • batch_current
  • latent_previous
titlePlay title
positive
negative
seed0
filename_basefot_play
fps20
width480
height832
frames_count_per_batch41

This is the node everything else in the pack orbits. Play (Start) is the entry point to comfyui_play_traversal, a low-VRAM experiment in making long video: instead of generating one 5-second clip and praying, you describe a whole "play" as a tree - acts, scenes, scene-beats - and this node flattens that tree into a queue of small renderable batches that get looped one at a time.

The author's framing is right there in the README: they started playing with ComfyUI video a few months back, hit the wall of producing anything longer than 3 seconds on an 8 GB card, and built this to fix exactly that. You supply the model; the pack supplies the narrative scaffolding. The bundled sample workflow is built around Wan 2.2 (text-to-video) at 480x832, which is a sensible pairing for the 8 GB / 32 GB target.

How the tree becomes batches

You don't wire scenes directly into a sampler. You build the tree with the pack's constructors - Scene-BeatScenePlay-Act - and feed up to two acts into Play (Start) via act_1 and act_2. On its first run, the node walks the whole tree and computes, for every scene-beat, frames_count = fps × duration_secs. It then chops each beat into chunks of frames_count_per_batch (default 41) and each chunk becomes a BATCH record with its own index_play, filename, and frames_first/frames_last range.

The first batch is exposed immediately; the rest ride along in the sequence_batches output, waiting for the loop (that's what Play (Continue) is for - you'll always have a flow wire from here to one). Continuity between chunks is handled through latent_previous, the output where the previous batch's final latent comes back in so the next chunk starts from where the last one stopped - the "adjacent latent transition" idea the README is excited about.

The inputs that matter

  • model, clip, vae - the standard trio from your checkpoint loader. Nothing clever.
  • fps, width, height - resolution and rate for the whole play. Defaults (480x832 at 20 fps) are Wan-appropriate.
  • frames_count_per_batch - the single most important knob for your VRAM. Smaller chunks = safer on low VRAM, more loop iterations, more time.
  • positive, negative - plain strings, not conditioning. Do not try to wire a CLIPTextEncode output into these.
  • seed - author's tooltip: "The random seed used for creating the noise." Zero or any int.
  • filename_base - root of the chunk filenames; beats and scenes append their own filename_parts.

On the output side, the ones you'll actually touch: flow (into Play Continue), sequence_batches (also into Play Continue), batch_current (into Batch Data so the loop body knows what frames it's rendering), and play_current / scene_current / beat_current for the Data-extractor nodes. data is a passthrough for anything you want to carry around the loop untouched.

Installing

Easiest via ComfyUI Manager: search "comfyui_play_traversal" and install. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/wgedeon/comfyui_play_traversal
pip install -r requirements.txt   # or run install.bat / install.sh on Windows

Then restart ComfyUI. Heads up: that requirements file is a mouthful - diffusers, accelerate, onnxruntime, opencv-python, spandrel, peft, clip_interrogator, sentencepiece, matplotlib, lark. Expect a slow first install, and be aware some of those can collide with what other packs already pinned. The pack itself downloads no models; you bring your own video checkpoint.

Where people get burned

  • It's a hard-coded tree. Two acts, two scenes per act, two beats per scene. The README lists "make scene_* a dynamic list input" as a TODO - that's you, if you hit the ceiling.
  • No gaps. The list builders raise Found gap in scenes, please defragment! if you fill act_2 but leave act_1 empty. Fill from the top.
  • Keep durations sane. A beat shorter than one frame at your fps yields zero batches and the loop silently has nothing to do.
  • This is a small, early-stage pack (version "2.0.0-inprogress") from a single dev. It works, but it's not a battle-tested ecosystem fixture - expect rough edges and read the console logs, because this node prints a lot of them while it traverses.
CategoryFeller of Trees/Play Traversal

Inputs (15)

NameTypeDefaultDescription
modelMODEL
clipCLIP
vaeVAE
titleSTRINGPlay title
positiveSTRING
negativeSTRING
seedINT00–18446744073709550000The random seed used for creating the noise.
filename_baseSTRINGfot_play
fpsFLOAT201–100000
widthINT4801–100000
heightINT8321–100000
frames_count_per_batchINT411–100000
dataopt*
act_1optPLAY_ACT
act_2optPLAY_ACT

Outputs (12)

NameTypeDescription
flowFLOW_CONTROL
sequence_batchesBATCH
data*
modelMODEL
clipCLIP
vaeVAE
play_currentPLAY
act_currentPLAY_ACT
scene_currentSCENE
beat_currentSCENE_BEAT
batch_currentBATCH
latent_previousLATENT