APNext H3 Short Film Writer
Paste a manuscript, get a whole MiniMax H3 short film
- llm
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- image_9
- scenes
- durations
- lengths
- scenes_text
- synopsis
- script
- cast
- scene_count
- total_seconds
- session_id
- info
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- image_9
What it actually does
Drop a story, a treatment, a script or even a synopsis into manuscript, and this node hands you back a whole short film's worth of MiniMax H3 prompts - one complete scene prompt per clip, ready for the render side. It's the film-adaptation sibling of the same pack's Music Video Writer: that node paces a video by the song, this one paces it by the story.
Be clear about what it isn't: it doesn't render anything. It writes the prompts; ComfyUI's MiniMax H3 Reference to Video node turns them into actual clips, so you need the H3 weights on disk before any of this becomes a movie. What you get out is the whole plan - scenes, durations, a dialogue script, score notes - written in one coherent session so the film holds together instead of feeling like eight disconnected one-liners.
How the writing works
The manuscript is the contract. Named characters, events, places and any written dialogue survive verbatim into the scenes; the model only invents connective tissue where the manuscript is silent. Then:
- Size it.
length_mode= Scene count gives you exactlyscene_countscenes (1–80). Target length takestarget_minutesand derives the count at roughly 11 s per scene, the model pacing each clip to land near it. - Plan, then chunk. A first call fixes a synopsis with a full
Beats:plan plus wardrobe/location locks. Scenes are then written in chunks ofscenes_per_call(default 4). Withparallel_chunkson, up to 4 chunks at a time are drafted bydraft_model(defaulthaiku, several times faster than sonnet) and one continuity pass repairs drift; turn it off for the classic serial run that keeps one long session. - Craft baked in. Three-act turns at roughly ¼ and ¾, coverage variety, motivated light, and a score holding one musical voice across the film.
wildnessis a pure scale here - 0 = sober, 100 = unhinged staging - but unlike other writers it never injects surreal events, so facts and dialogue stay put.
The inputs that matter
manuscript- your source text. The whole point.length_mode+scene_countortarget_minutes- how big the film is.wildness- 0 to 100, the one dial most people actually touch.continuity_mode- Independent clips (hard cuts, each scene its own T2V opener) vs Continuous chain (written for C2V / motion-context chaining so scene N+1 opens on scene N's last frames).model-sonnetdefault, withopus/haiku/fable/defaultaliases,codexwhen the Codex CLI is installed, and anyollama:/lmstudio:/local:models your local servers were serving at page load. Or plug an APNext H3 LLM Backend into thellmsocket to run offline.wardrobe/locations- optional lock lines (one per character or place). Empty = the model fixes its own in the synopsis;enforce_wardrobe(on by default) triggers one repair turn if any shot drops an anchor.
The backend: your Claude Code subscription, not an API key
It's called Claude Code because that's the default engine. The node shells out to the local CLI and uses its login, so with use_subscription on (default) your ANTHROPIC_API_KEY is hidden and the work counts against your subscription seat, not API billing. No API key field anywhere. research sends the agent to the web for real locations and period wardrobe; director (on) loads the pack's H3 skill library. Don't want to touch the seat? A local model through the llm socket works too.
What comes out
scenes, durations and lengths are matching lists - wire them straight into the H3 video node's prompt and length. scenes_text is the whole film for previewing, synopsis the story summary, and script the dialogue written out as a script. session_id lets you continue the conversation in a refiner node later; image_1..9 pass your reference pictures through so the prompt numbering and the video node's sockets can't drift apart.
Installing it
It ships in dagthomas/comfyui_dagthomas ("SDXL Auto Prompter"). Easiest: ComfyUI Manager → search comfyui_dagthomas → Install, then restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt
The node downloads no models itself, but you need two external things: the Claude Code CLI installed and logged in once (claude on PATH, or point CLAUDE_CODE_PATH at it), and the MiniMax H3 weights for rendering - a hefty download, and one the H3 Community License restricts in the US, EU, UK and Korea, so check that before you commit.
Where people get burned
- It's slow on purpose. It's a full agent loop, not an API call: 25–60 s per H3 prompt, 10–20 minutes for a multi-scene chunk with director and research on.
timeout_secondsdefaults to 1200 as the node's own watchdog; a timed-out chunk retries at half size automatically. - Your subscription has a rolling window. Heavy batches can exhaust the five-hour limit; the node prints a clear warning.
- No temperature, no max_tokens. The CLI owns sampling, so vary the prompt to vary the output.
- Start small. The default of eight scenes is already a real film; don't set
scene_countto 80 on your first run. - On a very old copy, a 2024-era bug changed the working directory on load and broke ComfyUI's Restart button - long fixed, keep the pack updated.
Inputs (56)
| Name | Type | Default | Description |
|---|---|---|---|
| manuscript | STRING | The film's source: a story, a treatment, a script, a synopsis - any length. The model adapts it faithfully: named characters, events and written dialogue survive into the scenes; it invents connective tissue only where the manuscript is silent. | |
| length_mode | COMBO | Scene count (use scene_count) | How the film is sized. Scene count: exactly `scene_count` scenes. Target length: the node derives the scene count from `target_minutes` (~11 s per scene) and the model paces each scene's duration so the finished film lands close to the target. |
| scene_count | INT | 81–80 | How many scenes/clips, used in Scene count mode. |
| target_minutes | FLOAT | 2.00.5–30 | How long the film should be, used in Target length mode. |
| continuity_mode | COMBO | Independent clips (hard cuts, T2V openers) | Independent clips: each scene is its own clip with hard cuts. Continuous chain: written for C2V / motion-context chaining. |
| visual_style | COMBO | Live-action, 35mm cinematic film aesthetic | Opens every [Shot 1]; kept identical across the whole film. |
| dialogue_language | COMBO | English | 38 options: Auto (match the setting), English, Norwegian, Swedish, Danish, Finnish, +32 |
| wildness | INT | 250–100 | 0 = literal adaptation, 100 = fully unhinged staging. |
| model | COMBO | sonnet | Who writes the prompt. sonnet / opus / haiku / fable / default are Claude Code aliases (`default` = whatever the CLI is configured for). `codex` is the OpenAI Codex CLI with its configured model (shown when installed; `codex:<model-id>` in an H3 LLM Backend picks a specific one). 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 the agent CLI (Claude Code or Codex) 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 the API key from the CLI so it uses your login and subscription seat (ANTHROPIC_API_KEY for Claude Code, OPENAI_API_KEY for Codex). 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. |
| cast_1opt | STRING | A cast line or block from an H3 Characters node (its `cast` output). | |
| cast_2opt | STRING | A cast line or block from an H3 Characters node (its `cast` output). | |
| cast_3opt | STRING | A cast line or block from an H3 Characters node (its `cast` output). | |
| cast_4opt | STRING | A cast line or block from an H3 Characters node (its `cast` output). | |
| extra_castopt | STRING | Characters typed by hand, one per line. Merged with the cast sockets and with whoever the manuscript names. | |
| custom_dialogue_languageopt | STRING | — | |
| custom_visual_styleopt | STRING | — | |
| 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. | |
| 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. | |
| 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. |
| extra_instructionsopt | STRING | — | |
| image_notesopt | STRING | Per-picture notes, one per line: `Image 1: the lead`, `Image 2: the farmhouse, use as the location`. | |
| include_on_screen_textopt | BOOLEAN | false | — |
| include_soundscapeopt | BOOLEAN | true | — |
| include_non_diegetic_musicopt | BOOLEAN | true | The film's score, described per scene and kept in one musical voice. |
| resume_session_idopt | STRING | Continue an earlier run by feeding it that node's session_id. The whole conversation, images included, is still in context. A session sticks to its backend: Claude Code ids resume with Claude Code, `codex-` ids with Codex, `local-` ids with the same local model. | |
| 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. | |
| 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. | |
| 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. | |
| image_1opt | IMAGE | Reference image 1: <Picture 1> in the prompt. Connect the same image to image_1 on the MiniMax H3 Reference to Video node, or use this node's image_1 output. | |
| image_2opt | IMAGE | Reference image 2: <Picture 2> in the prompt. Connect the same image to image_2 on the MiniMax H3 Reference to Video node, or use this node's image_2 output. | |
| image_3opt | IMAGE | Reference image 3: <Picture 3> in the prompt. Connect the same image to image_3 on the MiniMax H3 Reference to Video node, or use this node's image_3 output. | |
| image_4opt | IMAGE | Reference image 4: <Picture 4> in the prompt. Connect the same image to image_4 on the MiniMax H3 Reference to Video node, or use this node's image_4 output. | |
| image_5opt | IMAGE | Reference image 5: <Picture 5> in the prompt. Connect the same image to image_5 on the MiniMax H3 Reference to Video node, or use this node's image_5 output. | |
| image_6opt | IMAGE | Reference image 6: <Picture 6> in the prompt. Connect the same image to image_6 on the MiniMax H3 Reference to Video node, or use this node's image_6 output. | |
| image_7opt | IMAGE | Reference image 7: <Picture 7> in the prompt. Connect the same image to image_7 on the MiniMax H3 Reference to Video node, or use this node's image_7 output. | |
| image_8opt | IMAGE | Reference image 8: <Picture 8> in the prompt. Connect the same image to image_8 on the MiniMax H3 Reference to Video node, or use this node's image_8 output. | |
| image_9opt | IMAGE | Reference image 9: <Picture 9> in the prompt. Connect the same image to image_9 on the MiniMax H3 Reference to Video node, or use this node's image_9 output. | |
| reference_image_useopt | COMBO | Characters only (ignore picture backgrounds) | How the reference pictures may be read. Characters only: every picture is a character/performer reference - identity (and wardrobe) carries over, the photo's background, setting and lighting are ignored, and no scene or location is ever derived from them; a picture note can still declare a specific image a location or prop. Auto: the model decides what each picture shows (a backdrop can become the scene). |
| scene_briefsopt | STRING | Manually planned scenes from chained H3 Scene Brief nodes. | |
| save_scenesopt | BOOLEAN | true | — |
| scenes_per_callopt | INT | 41–8 | Scenes per model call; long films are written in chunks in one session. |
| prompt_modeopt | COMBO | Ref2VA (bind reference images) | Ref (guide_ref_en.md) binds attached pictures as <Picture N>; FL / T2VA (guide_base_en.md) creates everything from scratch in words. Auto picks Ref when images are connected. |
| draft_modelopt | COMBO | haiku | Who DRAFTS the scene chunks. The main `model` stays the director: it plans the video (synopsis, wardrobe/location locks, scene plan) and runs the continuity repair, while this model writes the scenes from that plan. haiku drafts several times faster than sonnet. `same as model` turns the split off. Ignored when the run is backed by Codex, a local server or an H3 LLM Backend override - those runs use one model throughout. |
| parallel_chunksopt | BOOLEAN | true | Write the scene chunks concurrently instead of one after another: one planning call (by `model`) fixes the synopsis, the Beats plan and the locks, then up to 4 chunks at a time are drafted from that plan (by `draft_model`), and one continuity pass repairs any drift. Much faster for long films. Off = the classic serial run where every chunk continues one session. Ignored when resume_session_id is set or the whole film fits in one call. |
Outputs (20)
| Name | Type | Description |
|---|---|---|
| scenes | STRING | — |
| durations | FLOAT | — |
| lengths | INT | — |
| scenes_text | STRING | — |
| synopsis | STRING | — |
| script | STRING | — |
| cast | STRING | — |
| scene_count | INT | — |
| total_seconds | FLOAT | — |
| session_id | STRING | — |
| info | STRING | — |
| image_1 | IMAGE | — |
| image_2 | IMAGE | — |
| image_3 | IMAGE | — |
| image_4 | IMAGE | — |
| image_5 | IMAGE | — |
| image_6 | IMAGE | — |
| image_7 | IMAGE | — |
| image_8 | IMAGE | — |
| image_9 | IMAGE | — |