APNext H3 Claude Code Scenes Writer
One idea, ten scenes, one continuous story
- image
- llm
- subject_1
- subject_2
- subject_3
- scenery_1
- scenery_2
- scenery_3
- object_1
- object_2
- object_3
- scenes
- durations
- scenes_text
- synopsis
- scene_count
- session_id
- info
Writing one H3 prompt with APNext H3 Claude Code Writer gets you a clip. Writing a story means writing a run of clips that hang together - and that's the whole pitch of APNext H3 Claude Code Scenes Writer: one idea in, 1–10 consecutive T2VA prompts out, each a complete base-format H3 prompt (the integrated_multimodal_description / overall_soundscape / non_diegetic_music three-field contract) with its own duration, forming one continuous story.
The Claude Code CLI writes them through the same director skills, camera vocabulary, dialogue toggles and wildness bands as the base writer - the official MiniMax guides in data/h3/ sit in the system prompt, so the model follows the real spec instead of a paraphrase. Each scene is written with a hand-off to the next, and the outputs are lists: scenes and durations have one element per scene, which is what lets a downstream video node render the whole run.
Inputs that matter
idea- the story, sequence, or idea to expand. Say what happens; the node handles the H3 grammar.scene_count- 1–10. Each becomes one element of thesceneslist.duration_mode- Fixed (every scene =scene_duration) or Vary 5–15s, where Claude paces each scene to fit the beat of the story.continuity_mode- the important one. Independent clips writes each scene as its own T2V clip with hard cuts and "already speaking" openers. Continuous chain writes for C2V / motion-context chaining: scene N+1 opens on scene N's last frame, one continuous take, a 2-second silent hand-off before a new speaker's first line. Pick this if you plan to render via Contex Loop or motion-context.visual_style- kept identical across the whole run so scene 7 doesn't suddenly switch film stocks.wildness,shot_plan, the camera block, dialogue toggles - as on the single writer.- Optional
image- context only; the scenes are T2VA, so nothing becomes<Picture N>. The typedsubject_1..3/scenery_1..3/object_1..3sockets are the better tool here: they describe who's who, where it is, and what matters into every scene in words, so the characters and the location stay consistent without the video model ever seeing the pictures. wardrobe/locations- the continuity locks, one line per character/place, copied word-for-word into every shot.enforce_wardrobethen parses the output and fires one repair turn if anything got dropped.
Outputs: scenes (list), durations (list), scenes_text (all scenes in === SCENE NN | duration: S.S === envelopes, for previewing), synopsis, scene_count, session_id and info.
Where the lists go
Wire scenes into the H3 video node's prompt and it runs once per scene - a full queue renders the whole story. For iteration, drop H3 Scene Pick in front to render one scene; for one output file, finish with H3 Scenes Join; for true scene-to-scene continuity, route through H3 Scenes → Contex Loop Plan. The pack's h3_scenes_batch.json and h3_scenes_pick_one.json examples show both.
Installing
Part of dagthomas/comfyui_dagthomas: ComfyUI Manager → comfyui_dagthomas, or clone into custom_nodes + pip install -r requirements.txt, restart. Under APNext → H3.
The prerequisite is Claude Code itself - installed, logged in, on PATH. Each scene costs a real Claude Code turn, so a 10-scene run with the director skills on is minutes and a chunk of your subscription window; for longer jobs the pack writes in chunks that continue one session. Don't want to pay in seats at all? Connect an H3 LLM Backend to the llm socket and the same run happens on Ollama - research is ignored there, but everything else behaves.
Inputs (50)
| Name | Type | Default | Description |
|---|---|---|---|
| idea | STRING | The story, sequence or idea to expand into several scenes. Say what happens; the node handles the H3 grammar. | |
| scene_count | INT | 31–10 | How many scenes to write. Each becomes one element of the scenes list. |
| duration_mode | COMBO | Fixed (every scene = scene_duration) | 2 options: Fixed (every scene = scene_duration), Vary 5-15s (let Claude pace each scene) |
| continuity_mode | COMBO | Independent clips (hard cuts, T2V openers) | Independent clips: each scene is its own T2V clip with hard cuts. Continuous chain: scenes are written for C2V / motion-context chaining (Contex Loop, Add Guide, Motion Context) - scene N+1 opens on scene N's last frame, one continuous take, speaker hand-off beats, rotating closers. |
| scene_duration | FLOAT | 10.01–20 | Seconds per scene in Fixed mode, and the fallback when Claude omits a duration in Vary mode. |
| shot_plan | COMBO | Auto | Shots per scene. |
| visual_style | COMBO | Auto | Style stated at the start of every [Shot 1]; kept identical across the run. The list is the guide's styles plus the APNext Cinematic vocabulary (film stock, grading, aesthetics); pick Custom and fill in custom_visual_style to write your own. |
| wildness | INT | 250–100 | 0 = literal and conservative, 100 = fully unhinged. |
| camera_motion | COMBO | Auto | 21 options: Auto, Static Shot, Zoom In, Zoom Out, Push In, Pull Out, +15 |
| camera_amplitude | COMBO | Auto | 4 options: Auto, with small amplitude, medium (omit), with large amplitude |
| camera_speed | COMBO | Auto | 4 options: Auto, at slow speed, normal (omit), at fast speed |
| include_dialogue | BOOLEAN | true | — |
| dialogue_language | COMBO | English | 38 options: Auto (match the setting), English, Norwegian, Swedish, Danish, Finnish, +32 |
| include_on_screen_text | BOOLEAN | false | — |
| include_soundscape | BOOLEAN | true | — |
| include_non_diegetic_music | BOOLEAN | true | — |
| model | COMBO | sonnet | Who writes the prompt. sonnet / opus / haiku / fable / default are Claude Code aliases (`default` = whatever the CLI is configured for). ollama: / lmstudio: / local: entries are whatever your local servers were serving when the page loaded; pick one to run fully offline. Anything not listed goes in model_override. |
| research | BOOLEAN | false | Let Claude Code search the web for real references before writing - the actual location, wardrobe, lighting and physics. Slower, and it reaches the internet. |
| director | BOOLEAN | true | Load the H3 director skills (data/h3/skills): the core writing rules, the format this node emits, and style/motion craft, each with a reference library of gold examples and style anchors that Claude Code reads on demand. Costs a few extra seconds and tokens per run. |
| use_subscription | BOOLEAN | true | Hide ANTHROPIC_API_KEY from the CLI so it uses your Claude Code login and subscription seat. Turn off to bill the API key instead. |
| timeout_seconds | INT | 120060–7200 | How long to wait PER CALL before the node gives up on the CLI (this is the node's own watchdog, not a Claude limit). Single H3 prompts take 25-60s; a multi-scene chunk with director/research on can take 10-20 minutes. The multi-scene writers retry a timed-out chunk at half size automatically. |
| seed | INT | -1-1–18446744073709550000 | Seeds the surreal picks and controls caching. -1 re-runs every queue. |
| imageopt | IMAGE | Context only: pictures to describe from (a look, a place, a person). The scenes are T2VA, so nothing becomes <Picture N>. | |
| extra_instructionsopt | STRING | — | |
| custom_dialogue_languageopt | STRING | — | |
| custom_visual_styleopt | STRING | Any visual style not in the dropdown, e.g. 'hand-painted cel animation' or 'Kodak Vision3 500T, anamorphic'. Overrides the dropdown when filled in. | |
| wardrobeopt | STRING | Wardrobe lock, one line per character, e.g. `Sheldon: brown corduroy jacket, green Flash T-shirt, khaki trousers, small silver ring in the left nostril`. Used word-for-word in every shot. Empty = Claude fixes one outfit per character itself (in the synopsis) and repeats it in every shot. | |
| enforce_wardrobeopt | BOOLEAN | true | After writing, check that every shot a character is in restates all of that character's wardrobe anchors verbatim, and that every scene set in a locked location restates that location's anchors. If anything is dropped or changed, the model gets one repair turn in the same session. Off = trust the first answer. |
| scene_briefsopt | STRING | Manually planned scenes from chained H3 Scene Brief nodes: each brief (what happens, where, which cast members and pictures) becomes the binding plan for its scene. Pinned numbers take that scene; unpinned briefs fill in order; scenes without a brief stay the model's to invent. | |
| resume_session_idopt | STRING | Continue an earlier Claude Code run by feeding it that node's session_id. The whole conversation, images included, is still in context. | |
| working_diropt | STRING | A folder Claude Code may read while writing - a script, a shot list, lookbook notes. Empty uses a throwaway scratch folder, which is the safe default. | |
| locationsopt | STRING | Location lock, one line per recurring place, e.g. `Sheldon's living room: beige three-seat sofa facing a wall-mounted TV on the LEFT, tall bookshelf of comics behind it, bay window with white blinds on the RIGHT, warm tungsten floor lamp in the far corner`. Used word-for-word in every scene set there, so the room looks the same in every scene. Empty = the model fixes each recurring place itself (in the synopsis) and repeats it. | |
| llmopt | APNEXT_LLM | Optional. Connect an APNext H3 LLM Backend node to write with Ollama, LM Studio, another OpenAI-compatible server or an API model instead of Claude Code. Overrides the model dropdown while connected. | |
| subject_1opt | IMAGE | Subject 1: a person, creature or character. Only WHO they are carries over - face, hair, build, wardrobe, distinctive marks. The photo's backdrop, light and framing are ignored; the scene comes from your idea. The video model never sees this image. | |
| subject_2opt | IMAGE | Subject 2: a person, creature or character. Only WHO they are carries over - face, hair, build, wardrobe, distinctive marks. The photo's backdrop, light and framing are ignored; the scene comes from your idea. The video model never sees this image. | |
| subject_3opt | IMAGE | Subject 3: a person, creature or character. Only WHO they are carries over - face, hair, build, wardrobe, distinctive marks. The photo's backdrop, light and framing are ignored; the scene comes from your idea. The video model never sees this image. | |
| scenery_1opt | IMAGE | Scenery 1: a location or environment. Its architecture, terrain, light, weather, palette and mood become the setting, described in words. People in it are ignored. | |
| scenery_2opt | IMAGE | Scenery 2: a location or environment. Its architecture, terrain, light, weather, palette and mood become the setting, described in words. People in it are ignored. | |
| scenery_3opt | IMAGE | Scenery 3: a location or environment. Its architecture, terrain, light, weather, palette and mood become the setting, described in words. People in it are ignored. | |
| object_1opt | IMAGE | Object 1: a prop, product, vehicle or costume piece to depict faithfully - shape, colour, material, markings. Where it is in the photo is ignored. | |
| object_2opt | IMAGE | Object 2: a prop, product, vehicle or costume piece to depict faithfully - shape, colour, material, markings. Where it is in the photo is ignored. | |
| object_3opt | IMAGE | Object 3: a prop, product, vehicle or costume piece to depict faithfully - shape, colour, material, markings. Where it is in the photo is ignored. | |
| context_1opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_2opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_3opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_4opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_5opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_6opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_7opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. | |
| context_8opt | STRING | Steering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| scenes | STRING | — |
| durations | FLOAT | — |
| scenes_text | STRING | — |
| synopsis | STRING | — |
| scene_count | INT | — |
| session_id | STRING | — |
| info | STRING | — |