Story Scene Switch
The traffic cop that decides first scene vs. keep going
- image_input
- last_frame_input
- Image
- Prompt
- SceneMode
- LastFrame
- ForceFlag
- AutoFlag
Every iterative video workflow hits the same fork in the road: am I generating the first scene, or the next one? The first has no past to build on. Every scene after needs to know what came before it. Story Scene Switch exists to make that fork a node instead of a ritual of re-cabling your graph between runs.
It's the routing hub of ComfyUI Video Progression. You tell it which scene you're on, and it decides two things for you: which image feeds the sampler and which prompt feeds the text encoder. Everything downstream - the sampler, the image picker, Whole Video - just reads its outputs.
How it routes
First Scene Generation cleans out the pack's temporary last-frame files, then uses your image_input as the main image. If force_last_frame is set to Yes, it exposes last_frame_input on the LastFrame output so you can pair a start frame with an explicit end frame.
Further Generations is where the "progression" actually happens. It finds the latest Infinite_Video*.mp4 in your output folder and pulls the last frame out of it - via imageio talking to ffmpeg, not by decoding the whole video - and that frame becomes the start of the next scene. If it can't read the video it falls back to image_input. Flip force_last_frame to Yes and wire last_frame_input, and you override that extracted frame with a hand-picked one; that's where Last Frame Save's temp_last_frame.png gets consumed.
Prompt logic is the other half. In first-scene mode - or whenever user_prompt is Yes - the node uses the prompt you provided. Otherwise it loads prompt_further.txt from the output folder and uses that. Either way it never rewrites the prompt body; it only wraps it in a storytelling prefix and a "no subtitles, no on-screen text" suffix. So prompt_further.txt is effectively your "what happens next" file, editable between scenes.
Then there's auto_generate. Set it to Yes and the node hard-forces Further Generations behavior no matter what scene_mode says - the switch from README's own words: first scene can't be auto-generated, and the SceneMode output reflects the effective mode. That's how you run an unattended continuation loop.
The inputs and outputs that matter
scene_mode-First Scene Generation/Further Generationsuser_prompt-No/Yes, force the provided promptauto_generate-No/Yes, lock everything to Furtherforce_last_frame-No/Yes, enable the forced last-frame branchimage_input,last_frame_input,prompt(optional), andtrigger(a FLOAT you nudge to force a re-run when the graph thinks nothing changed)
Outputs, the six-pack that makes the wiring work:
Image- the image to feed your generation branchPrompt- the finished, wrapped promptSceneMode- the effective mode, meant for Whole VideoLastFrame- the forced last frame; only populated whenforce_last_frameis YesForceFlag- BOOLEAN mirror offorce_last_frameAutoFlag- BOOLEAN mirror ofauto_generate
Recommended wiring
The README's progression chain is: Story Scene Switch → your generation/edit branch → VP Image Chooser → Whole Video → VHS Video Combine. Plus three control links worth copying:
AutoFlag→ VP Image Chooser'sauto_pick(unattended candidate picking)ForceFlag→LazySwitchKJSceneMode→ Whole Video'sscene_mode
Troubleshooting, the three that actually bite
- Wrong frame on a further generation. The switch reads the latest
Infinite_Video*.mp4(highest numeric suffix, then newest mtime). A stale video lingering in the output folder is your bug - delete or archive it. - The prompt came out... weird. Check
prompt_further.txtexists and is current. A missing file means an empty prompt wrapped in prefixes. - It won't re-run. That's what
triggeris for - bump it and the node fires again even though its inputs look identical.
Install
The whole pack installs at once - Manager → Install Custom Nodes → search "Comfyui-Video-Progression" → install → restart. Or the terminal version:
cd ComfyUI/custom_nodes
git clone https://github.com/pmarmotte2/Comfyui-Video-Progression
then restart ComfyUI. No model downloads. The one real dependency is that imageio can read MP4 files in your environment - imageio-ffmpeg handles that in a normal install. The author, the same pmarmotte2 who ships the Fill-ChatterBox podcast node and the PoseStudio pack, clearly built this to run a long-form video project; this switch is where all of that intent is encoded. Learn it and the rest of the pack clicks into place.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| scene_mode | COMBO | 2 options: First Scene Generation, Further Generations | |
| user_prompt | COMBO | 2 options: No, Yes | |
| auto_generateopt | COMBO | No | 2 options: No, Yes |
| force_last_frameopt | COMBO | No | 2 options: No, Yes |
| image_inputopt | IMAGE | — | |
| last_frame_inputopt | IMAGE | — | |
| promptopt | STRING | — | |
| triggeropt | FLOAT | 0.00 | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| Image | IMAGE | — |
| Prompt | STRING | — |
| SceneMode | STRING | — |
| LastFrame | IMAGE | — |
| ForceFlag | BOOLEAN | — |
| AutoFlag | BOOLEAN | — |