Nodes/SDXL Auto Prompter/APNext H3 Short Film Writer
ComfyUI Node

APNext H3 Short Film Writer

Paste a manuscript, get a whole MiniMax H3 short film

By dagthomas·Created 3 years ago·Updated about 23 hours ago· 289
APNext H3 Short Film Writer
  • 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
manuscript
length_modeScene count (use scene_count)
scene_count8
target_minutes2.0
continuity_modeIndependent clips (hard cuts, T2V openers)
visual_styleLive-action, 35mm cinematic film aesthetic
dialogue_languageEnglish
wildness25
modelsonnet
researchfalse
directortrue
use_subscriptiontrue
timeout_seconds1200
seed-1
cast_1
cast_2
cast_3
cast_4
extra_cast
custom_dialogue_language
custom_visual_style
wardrobe
locations
enforce_wardrobetrue
extra_instructions
image_notes
include_on_screen_textfalse
include_soundscapetrue
include_non_diegetic_musictrue
resume_session_id
working_dir
context_1
context_2
context_3
context_4
context_5
context_6
context_7
context_8
reference_image_useCharacters only (ignore picture backgrounds)
scene_briefs
save_scenestrue
scenes_per_call4
prompt_modeRef2VA (bind reference images)
draft_modelhaiku
parallel_chunkstrue

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:

  1. Size it. length_mode = Scene count gives you exactly scene_count scenes (1–80). Target length takes target_minutes and derives the count at roughly 11 s per scene, the model pacing each clip to land near it.
  2. Plan, then chunk. A first call fixes a synopsis with a full Beats: plan plus wardrobe/location locks. Scenes are then written in chunks of scenes_per_call (default 4). With parallel_chunks on, up to 4 chunks at a time are drafted by draft_model (default haiku, several times faster than sonnet) and one continuity pass repairs drift; turn it off for the classic serial run that keeps one long session.
  3. Craft baked in. Three-act turns at roughly ¼ and ¾, coverage variety, motivated light, and a score holding one musical voice across the film. wildness is 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_count or target_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 - sonnet default, with opus / haiku / fable / default aliases, codex when the Codex CLI is installed, and any ollama: / lmstudio: / local: models your local servers were serving at page load. Or plug an APNext H3 LLM Backend into the llm socket 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_seconds defaults 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_count to 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.
Categorycomfyui_dagthomas/H3

Inputs (56)

NameTypeDefaultDescription
manuscriptSTRINGThe 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_modeCOMBOScene 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_countINT81–80How many scenes/clips, used in Scene count mode.
target_minutesFLOAT2.00.5–30How long the film should be, used in Target length mode.
continuity_modeCOMBOIndependent 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_styleCOMBOLive-action, 35mm cinematic film aestheticOpens every [Shot 1]; kept identical across the whole film.
dialogue_languageCOMBOEnglish38 options: Auto (match the setting), English, Norwegian, Swedish, Danish, Finnish, +32
wildnessINT250–1000 = literal adaptation, 100 = fully unhinged staging.
modelCOMBOsonnetWho 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.
researchBOOLEANfalseLet 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.
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 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_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.
cast_1optSTRINGA cast line or block from an H3 Characters node (its `cast` output).
cast_2optSTRINGA cast line or block from an H3 Characters node (its `cast` output).
cast_3optSTRINGA cast line or block from an H3 Characters node (its `cast` output).
cast_4optSTRINGA cast line or block from an H3 Characters node (its `cast` output).
extra_castoptSTRINGCharacters typed by hand, one per line. Merged with the cast sockets and with whoever the manuscript names.
custom_dialogue_languageoptSTRING
custom_visual_styleoptSTRING
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.
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.
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.
extra_instructionsoptSTRING
image_notesoptSTRINGPer-picture notes, one per line: `Image 1: the lead`, `Image 2: the farmhouse, use as the location`.
include_on_screen_textoptBOOLEANfalse
include_soundscapeoptBOOLEANtrue
include_non_diegetic_musicoptBOOLEANtrueThe film's score, described per scene and kept in one musical voice.
resume_session_idoptSTRINGContinue 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_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.
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.
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.
image_1optIMAGEReference 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_2optIMAGEReference 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_3optIMAGEReference 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_4optIMAGEReference 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_5optIMAGEReference 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_6optIMAGEReference 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_7optIMAGEReference 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_8optIMAGEReference 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_9optIMAGEReference 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_useoptCOMBOCharacters 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_briefsoptSTRINGManually planned scenes from chained H3 Scene Brief nodes.
save_scenesoptBOOLEANtrue
scenes_per_calloptINT41–8Scenes per model call; long films are written in chunks in one session.
prompt_modeoptCOMBORef2VA (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_modeloptCOMBOhaikuWho 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_chunksoptBOOLEANtrueWrite 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)

NameTypeDescription
scenesSTRING
durationsFLOAT
lengthsINT
scenes_textSTRING
synopsisSTRING
scriptSTRING
castSTRING
scene_countINT
total_secondsFLOAT
session_idSTRING
infoSTRING
image_1IMAGE
image_2IMAGE
image_3IMAGE
image_4IMAGE
image_5IMAGE
image_6IMAGE
image_7IMAGE
image_8IMAGE
image_9IMAGE