APNext Gemini Next Scene
Generate the next shot for a video sequence with Gemini
- image
- next_scene_prompt
- short_description
This one's a clever niche tool. You give it the current frame of a sequence and the prompt that produced it, and Gemini writes the prompt for the next shot - a natural continuation with a camera move, a framing change, or an atmospheric shift. It's built for storyboarding and image-to-video work, where the hard part isn't any single frame but making one shot flow believably into the next. Instead of hand-writing "and now push in slightly and let the fog roll in," you let a vision model that can actually see the current frame propose the transition.
It fits a real, growing workflow. As people chain image and video models to build sequences, "what's the next scene" becomes a prompt-writing problem, and having Gemini look at the frame and continue the story is a smart way to keep continuity without babysitting every step. It's a specialist node - you won't use it for one-off images - but for sequential/I2V work it earns its slot.
How it works
The node sends your current image plus the original_prompt (the previous scene's description) to Gemini, which analyzes the frame and writes a continuation prompt. You steer the kind of continuation with focus_on (Camera Movement, Framing Evolution, Environmental Reveals, Atmospheric Shifts, or Automatic) and how big a jump it is with transition_intensity (Subtle, Moderate, Dramatic). It can prepend a scene marker so downstream video models know a cut is happening.
The inputs and outputs that matter
image- the current frame. Gemini looks at this to ground the continuation.original_prompt- the previous scene's description; the "where we are now" the model builds from.focus_on(optional) - what changes in the next shot.Automaticlets Gemini decide; the others force a camera move, a reframe, a reveal, or a mood shift.transition_intensity(optional) - Subtle for a gentle continuation, Dramatic for a hard change.gemini_model- the model dropdown; Flash is the cheap default.add_scene_prefix+scene_prefix_text(defaultNEW SCENE:) - prepend a marker to the output.seed+randomize_each_run- vary the proposed transitions.
Two outputs: next_scene_prompt (the full continuation prompt to feed your next generation) and short_description (a compact summary of the transition).
How to install it
ComfyUI Manager: search comfyui_dagthomas, install, restart. Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas && pip install -r requirements.txt
then restart. Needs google-generativeai (in requirements.txt) and a GEMINI_API_KEY set in the environment before launching ComfyUI.
Where people get burned
- Key missing or set too late. Export
GEMINI_API_KEYbefore starting ComfyUI. - Hosted ComfyUI blocks it. It's a cloud call; serverless instances usually can't make it. For a fully local sequence pipeline, the pack's QwenVL Next Scene node does the same job with a local model.
- Garbage in, garbage out on continuity. If
original_promptdoesn't actually match the frame you passed, the continuation drifts. Keep the previous prompt and the current image in sync. Dramaticcan break coherence. A big transition intensity is great for a real cut, bad if you wanted a smooth pan. Match the intensity to the edit you actually want.- It writes prompts, not video. This node only produces the next prompt - you still feed that into your image/video model to render the shot.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| original_prompt | STRING | — | |
| gemini_model | COMBO | gemini-2.5-flash | 5 options: gemini-2.5-pro, gemini-flash-latest, gemini-2.5-flash, gemini-flash-lite-latest, gemini-2.5-flash-lite |
| seed | INT | -1-1–18446744073709550000 | — |
| randomize_each_run | BOOLEAN | true | — |
| add_scene_prefix | BOOLEAN | true | — |
| scene_prefix_textopt | STRING | NEW SCENE: | — |
| focus_onopt | COMBO | Automatic | 5 options: Automatic, Camera Movement, Framing Evolution, Environmental Reveals, Atmospheric Shifts |
| transition_intensityopt | COMBO | Moderate | 3 options: Subtle, Moderate, Dramatic |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| next_scene_prompt | STRING | — |
| short_description | STRING | — |