Nodes/SDXL Auto Prompter/APNext H3 Crossover Writer
ComfyUI Node

APNext H3 Crossover Writer

Crossover scenes from a cast

By dagthomas·Created 3 years ago·Updated about 6 hours ago· 287
APNext H3 Crossover Writer
  • llm
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • image_7
  • image_8
  • image_9
  • scenes
  • durations
  • scenes_text
  • synopsis
  • cast
  • scene_count
  • session_id
  • info
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • image_7
  • image_8
  • image_9
direction
extra_cast
scene_count3
duration_modeFixed (every scene = scene_duration)
continuity_modeIndependent clips (hard cuts, T2V openers)
scene_duration15.0
shots_per_sceneAuto
visual_styleLive-action, 35mm cinematic film aesthetic
dialogue_languageEnglish
wildness35
modelsonnet
researchfalse
directortrue
use_subscriptiontrue
timeout_seconds1200
seed-1
cast_1
cast_2
cast_3
cast_4
custom_dialogue_language
custom_visual_style
wardrobe
enforce_wardrobetrue
extra_instructions
image_notes
resume_session_id
working_dir
locations
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

Every video model can put two characters in a room. Putting Caitlyn from Arcane in a room with Bruce Banner - and keeping them them - is where naive prompting dies, which is why APNext H3 Crossover Writer exists. It takes a cast (from H3 Characters nodes, or typed by hand) plus your creative brief, and has the local Claude Code CLI write 1–10 crossover scenes, each a complete four-section T2VA prompt (subject_definitions / integrated_multimodal_description / overall_soundscape / non_diegetic_music).

The rules it writes under aren't vibes. They're distilled from actually-rendered crossover productions and shipped in data/h3/guide_crossover_en.md: actor pinning, <Subject N> speaker binding, silence mandates, not in frame isolation, positioned two-shots, no dead air, grounded entrances, hand-offs between scenes. No title cards unless you ask. That's the part you can't get from just pasting "crossover" into a prompt box - the guide is the system prompt, so every scene comes out of the model already knowing who's where and who gets to talk.

The inputs that matter

  • direction - your creative brief: premise, tone, where it happens, what must happen, running gags, who should clash. This is the actual writing; everything else is scaffolding.
  • cast_1..4 - cast outputs from H3 Characters nodes. Chain several Characters nodes through cast_in to stack a big cast onto one socket, or use several sockets. extra_cast takes hand-typed lines (Character (played by Actor) from Show) merged in.
  • scene_count - 1–10.
  • duration_mode / scene_duration - fixed length per scene, or let Claude pace each scene 5–15s.
  • continuity_mode - Independent clips (each scene its own T2V clip, hard cuts) vs Continuous chain (written for C2V / motion-context chaining, scene N+1 opening on scene N's last frame). This decides whether you stitch or chain downstream.
  • wardrobe / locations - the locks: one line per character/place, copied word-for-word into every shot the character is on screen in, every scene set in that place. Empty = the model fixes its own in the synopsis and repeats them. enforce_wardrobe (on by default) parses the result and fires one repair turn in the same session if any shot dropped an anchor - the result shows up in info as wardrobe: ok (2 locked) or repaired 6 -> 0.
  • image_1..9 - reference pictures. Downscaled copies go to Claude so it can recognise who/what each picture is (use image_notes - Image 1: Sheldon); pictured characters get bound to their <Picture k> and their wardrobe lock is taken from the picture. The originals pass through to the matching outputs, ready for MiniMax H3 Reference to Video.

Outputs: scenes (list) and durations (list) - one per scene - plus scenes_text, synopsis, the merged cast, scene_count, session_id, info, and the image_1..9 passthrough.

Rendering options

A video node fed scenes runs once per element: one queue, every scene. For iteration, H3 Scene Pick grabs one scene by index. For one output file, H3 Scenes Join. For a seamless single take, the pack's h3_crossover_contex_chain.json runs the writer in continuous-chain mode into H3 Scenes → Contex Loop Plan. The h3_crossover_batch.json, h3_crossover_pick_one.json and h3_llm_backend_crossover.json examples cover the rest.

Installing

Part of dagthomas/comfyui_dagthomas ("SDXL Auto Prompter"): ComfyUI Manager → comfyui_dagthomas, or clone into custom_nodes + pip install -r requirements.txt, restart. Node under APNext → H3.

Requirements are Claude Code installed and logged in (subscription seat by default via use_subscription; flip it to bill an API key instead if you'd rather). Multi-scene runs are the slow end - several scenes × 25–60s each plus the enforcement pass. If you'd rather run free, an H3 LLM Backend on the llm socket moves the whole thing to Ollama, with research ignored but locks, sessions and outputs otherwise identical.

Categorycomfyui_dagthomas/H3

Inputs (49)

NameTypeDefaultDescription
directionSTRINGYour steer for the AI: premise, tone, genre, where it happens, what must happen, running gags, who should clash. Free text - this is the creative brief the scenes are built from.
extra_castSTRINGExtra cast typed by hand, one per line, ideally as `Character (played by Actor) from Show`. Merged with the cast sockets.
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_durationFLOAT15.05–20Seconds per scene in Fixed mode. Also the fallback if Claude omits a duration in Vary mode. Cut timecodes are spread across this length.
shots_per_sceneCOMBOAutoShots per scene. Auto lets Claude choose 2-3 to fit the duration.
visual_styleCOMBOLive-action, 35mm cinematic film aestheticOpens every [Shot 1]; kept identical across the run for continuity. The list is the guide's styles plus the APNext Cinematic vocabulary (film stock, grading, aesthetics); Custom uses custom_visual_style, Auto lets Claude pick one that suits the cast.
dialogue_languageCOMBOEnglish38 options: Auto (match the setting), English, Norwegian, Swedish, Danish, Finnish, +32
wildnessINT350–1000 = grounded and faithful to each show, 100 = fully unhinged. Above 40 seeds surreal events.
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.
cast_1optSTRINGA cast line or block from an H3 Characters node (its `cast` output). Chain several Characters nodes or use several sockets.
cast_2optSTRINGA cast line or block from an H3 Characters node (its `cast` output). Chain several Characters nodes or use several sockets.
cast_3optSTRINGA cast line or block from an H3 Characters node (its `cast` output). Chain several Characters nodes or use several sockets.
cast_4optSTRINGA cast line or block from an H3 Characters node (its `cast` output). Chain several Characters nodes or use several sockets.
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.
extra_instructionsoptSTRING
image_notesoptSTRINGWhat each reference image is, one per line: `Image 1: Sheldon`, `Image 3: the diner, use as the location`. With reference_image_use = Characters only (the default), such a note is the ONLY way a picture may be read as a location or prop - otherwise every picture is a character and its backdrop is ignored. In Auto mode Claude works it out from the cast and the pictures.
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.
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: 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.

Outputs (17)

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