Nodes/SDXL Auto Prompter/APNext H3 Claude Code Scenes Writer
ComfyUI Node

APNext H3 Claude Code Scenes Writer

One idea, ten scenes, one continuous story

By dagthomas·Created 3 years ago·Updated about 6 hours ago· 287
APNext H3 Claude Code Scenes Writer
  • 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
idea
scene_count3
duration_modeFixed (every scene = scene_duration)
continuity_modeIndependent clips (hard cuts, T2V openers)
scene_duration10.0
shot_planAuto
visual_styleAuto
wildness25
camera_motionAuto
camera_amplitudeAuto
camera_speedAuto
include_dialoguetrue
dialogue_languageEnglish
include_on_screen_textfalse
include_soundscapetrue
include_non_diegetic_musictrue
modelsonnet
researchfalse
directortrue
use_subscriptiontrue
timeout_seconds1200
seed-1
extra_instructions
custom_dialogue_language
custom_visual_style
wardrobe
enforce_wardrobetrue
scene_briefs
resume_session_id
working_dir
locations
context_1
context_2
context_3
context_4
context_5
context_6
context_7
context_8

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 the scenes list.
  • 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 typed subject_1..3 / scenery_1..3 / object_1..3 sockets 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_wardrobe then 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.

Categorycomfyui_dagthomas/H3

Inputs (50)

NameTypeDefaultDescription
ideaSTRINGThe story, sequence or idea to expand into several scenes. Say what happens; the node handles the H3 grammar.
scene_countINT31–10How many scenes to write. Each becomes one element of the scenes list.
duration_modeCOMBOFixed (every scene = scene_duration)2 options: Fixed (every scene = scene_duration), Vary 5-15s (let Claude pace each scene)
continuity_modeCOMBOIndependent 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_durationFLOAT10.01–20Seconds per scene in Fixed mode, and the fallback when Claude omits a duration in Vary mode.
shot_planCOMBOAutoShots per scene.
visual_styleCOMBOAutoStyle 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.
wildnessINT250–1000 = literal and conservative, 100 = fully unhinged.
camera_motionCOMBOAuto21 options: Auto, Static Shot, Zoom In, Zoom Out, Push In, Pull Out, +15
camera_amplitudeCOMBOAuto4 options: Auto, with small amplitude, medium (omit), with large amplitude
camera_speedCOMBOAuto4 options: Auto, at slow speed, normal (omit), at fast speed
include_dialogueBOOLEANtrue
dialogue_languageCOMBOEnglish38 options: Auto (match the setting), English, Norwegian, Swedish, Danish, Finnish, +32
include_on_screen_textBOOLEANfalse
include_soundscapeBOOLEANtrue
include_non_diegetic_musicBOOLEANtrue
modelCOMBOsonnetWho 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.
researchBOOLEANfalseLet Claude Code search the web for real references before writing - the actual location, wardrobe, lighting and physics. Slower, and it reaches the internet.
directorBOOLEANtrueLoad 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_subscriptionBOOLEANtrueHide 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_secondsINT120060–7200How 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.
seedINT-1-1–18446744073709550000Seeds the surreal picks and controls caching. -1 re-runs every queue.
imageoptIMAGEContext only: pictures to describe from (a look, a place, a person). The scenes are T2VA, so nothing becomes <Picture N>.
extra_instructionsoptSTRING
custom_dialogue_languageoptSTRING
custom_visual_styleoptSTRINGAny visual style not in the dropdown, e.g. 'hand-painted cel animation' or 'Kodak Vision3 500T, anamorphic'. Overrides the dropdown when filled in.
wardrobeoptSTRINGWardrobe 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_wardrobeoptBOOLEANtrueAfter 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_briefsoptSTRINGManually 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_idoptSTRINGContinue an earlier Claude Code run by feeding it that node's session_id. The whole conversation, images included, is still in context.
working_diroptSTRINGA 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.
locationsoptSTRINGLocation 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.
llmoptAPNEXT_LLMOptional. 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_1optIMAGESubject 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_2optIMAGESubject 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_3optIMAGESubject 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_1optIMAGEScenery 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_2optIMAGEScenery 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_3optIMAGEScenery 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_1optIMAGEObject 1: a prop, product, vehicle or costume piece to depict faithfully - shape, colour, material, markings. Where it is in the photo is ignored.
object_2optIMAGEObject 2: a prop, product, vehicle or costume piece to depict faithfully - shape, colour, material, markings. Where it is in the photo is ignored.
object_3optIMAGEObject 3: a prop, product, vehicle or costume piece to depict faithfully - shape, colour, material, markings. Where it is in the photo is ignored.
context_1optSTRINGSteering 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_2optSTRINGSteering 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_3optSTRINGSteering 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_4optSTRINGSteering 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_5optSTRINGSteering 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_6optSTRINGSteering 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_7optSTRINGSteering 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_8optSTRINGSteering 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)

NameTypeDescription
scenesSTRING
durationsFLOAT
scenes_textSTRING
synopsisSTRING
scene_countINT
session_idSTRING
infoSTRING