Scene Gen Data Extractor
The escape hatch from Replicate's bill
- Positive Prompts
- Negative Prompts
- Motion Prompts
- Start Frames
- End Frames
- Duration (Frames)
- Duration (Seconds)
Here's the thing nobody tells you about SceneGen - MusicVideo: the expensive half of the pipeline isn't the interesting half. Gemini analyzing your song and planning the shots costs tokens - cheap. The Replicate video generation, where every shot is a separate paid job, is what drains the account. The Scene Gen Data Extractor is the pack's answer to that: it pulls the plan out of the cloud pipeline so you can render it locally, for free, with your own video model.
It's the pack's "export" node, and it's the one that makes the whole thing feel less like a subscription trap and more like a tool.
How it works
The main node outputs Timeline Data (S9) - a JSON string describing every shot in the montage: the positive and negative prompts Gemini wrote, the motion prompt (video_trigger_prompt in the source), how long each shot runs, and where it sits in the timeline. The Extractor takes that one string and tears it into seven parallel lists, one per shot:
Positive PromptsandNegative Prompts- feed these into your text encoders.Motion Prompts- the per-shot camera/action direction.Start Frames/End Frames- frame numbers for each shot, andDuration (Frames)/Duration (Seconds)- so you can size the latent correctly.
Mechanically it's a json.loads over the timeline, walking each shot and turning cumulative time into frame counts. Nothing clever, which is fine - it exists to bridge a black box to your own graph.
Where to wire it
The pattern is: run the main node in Prompt Mode (which skips Replicate entirely and only spends Gemini money), grab the Timeline Data (S9) output, and pipe it into this node. Then:
- Positive/negative prompts → your local video model's conditioning.
- Start Frames → first-frame anchors for image-to-video.
- Durations → the scheduler and frame counts for each clip.
One honest caveat from the source: the Extractor hardcodes 24 fps when converting time to frames (fps = 24.0 # Assumption based on SceneGen default). If you ran the main node at 30 or 60 fps, every start/end frame number it hands you is wrong. Keep the main node at 24 fps when you're planning an extract-and-render run, or adjust the numbers yourself.
Also set expectations on the model: the pack's cloud mode offers "Wan 2.5", but Wan 2.5 is API-only - there's no local download for it. Your local render will use whatever you've got on disk: Wan 2.2, LTX Video, Hunyuan Video, or the SCAIL/Bernini family built on top of Wan 2.2 weights. The prompts Gemini writes are generic enough to feed any of them, so this still works - just don't expect a pixel-identical match with what the cloud would have produced.
Install
Same as the rest of the pack. ComfyUI Manager → search "Scene Gen", or:
cd ComfyUI/custom_nodes
git clone https://github.com/lazniak/scene_gen.git
cd scene_gen
pip install -r requirements.txt
Restart ComfyUI. The node lives in the Scene Gen menu category, and it has a single input: the Timeline Data (S9) string from the main node.
Gotchas
- No input, no output. If you feed it anything other than valid S9 JSON (or nothing), it returns seven empty lists and prints
Invalid JSON inputto the console. There's no error dialog - the run just silently produces nothing. Double-check your wiring before you blame your local renderer. - 24 fps assumption (above) - the most likely source of "my clips are the wrong length" confusion.
- The outputs are lists of strings, so in ComfyUI they'll fan out as
[list]connections; batch-capable nodes and loops are your friends here. Some one-shot nodes expect a single string and will only take the first element.
The extractor is a small, scrappy node, but it's the difference between a paid pipeline and a hybrid one: pay for the creative plan, render the video on your own GPU.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| timeline_data | STRING | Connect 'Timeline Data (S9)' output from Scene Gen node here. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| Positive Prompts | STRING | — |
| Negative Prompts | STRING | — |
| Motion Prompts | STRING | — |
| Start Frames | STRING | — |
| End Frames | STRING | — |
| Duration (Frames) | STRING | — |
| Duration (Seconds) | STRING | — |