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

APNext H3 Claude Code Reference Writer

MiniMax-H3 full-reference prompts, researched and written by Claude Code

By dagthomas·Created 3 years ago·Updated about 18 hours ago· 285
APNext H3 Claude Code Reference Writer
  • image_1
  • image_2
  • image_3
  • image_4
  • h3_prompt
  • subject_definitions
  • summary
  • retention_analysis
  • detailed_description
  • overall_soundscape
  • non_diegetic_music
  • session_id
  • info
idea
task_typeAuto (decide from the references)
reference_roleAuto (decide per image)
duration_seconds8.0
shot_planAuto
visual_styleAuto
wildness25
word_target425
camera_motionAuto
camera_amplitudeAuto
camera_speedAuto
include_dialoguetrue
dialogue_languageEnglish
include_on_screen_textfalse
include_soundscapetrue
include_non_diegetic_musictrue
modelsonnet
researchfalse
use_subscriptiontrue
timeout_seconds900
seed-1
reference_notes
extra_instructions
custom_dialogue_language
resume_session_id
working_dir

This is the Claude Code version of the H3 Reference Prompt Writer: same six-section full-reference format, same <Subject N>/<Picture N> label rules, same retention_analysis - but the model writing it is your locally installed Claude Code CLI, billing your subscription seat instead of an API key. If you've read the plain H3 Ref Prompt Writer article, you know the format; this one just answers the "who writes it and what can it look up" question differently.

It inherits every option from the reference writer - idea, task_type (the bracketed summary prefix: keyframe completion, reference generation, video editing, video continuation, audio reuse, audio reference), reference_role, word_target, shot_plan, visual_style, wildness, the camera vocabulary, include_dialogue and dialogue_language, plus four reference image inputs (image_1image_4) and reference_notes for describing what must survive or for video/audio references you can't attach.

Why this variant

Two reasons, same as its base-format sibling. The research toggle sends the CLI to the web before writing - the real location, the wardrobe, the light, the physics - and folds what it finds into the prompt as concrete visual detail, with no citations and no commentary in the output. For full-reference work that's genuinely useful: reference images give you the subject, research gives you the world it moves through, and both end up in the same structured prompt.

And it returns a session_id instead of model_used. That's the hook for refinement - wire it into the H3 Claude Code Refiner and describe the change in plain language ("keep the cardigan, move the market to dawn") with the guide, your reference images and the model's reasoning still in context. It also accepts a resume_session_id of its own and an optional working_dir for a script or lookbook the CLI may read.

Model aliases (sonnet, opus, haiku, fable, default), use_subscription, timeout_seconds (default 900 - reference rewrites are long) and seed all behave as on the other Claude Code nodes.

Install

Pack install is the shared routine - ComfyUI Manager (search "comfyui_dagthomas") or:

cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt

Restart, then make sure the Claude Code CLI is installed and logged in once (claude on PATH, or CLAUDE_CODE_PATH set). No ComfyUI-side API key needed. The reference images and guide files live in the pack already - nothing extra to download.

Common issues

  • References not sticking - the model can only track what it can see; verify your images are actually connected to image_1image_4, and lean on reference_notes to say plainly what must be preserved.
  • Slow with research on - a full-reference rewrite plus web fetches is a long agent loop. Bump timeout_seconds rather than killing the queue mid-run.
  • Subscription window - heavy batches can exhaust your plan's rolling limit; the node prints a warning when it hits it. That's the price of the seat.
Categorycomfyui_dagthomas/H3

Inputs (30)

NameTypeDefaultDescription
ideaSTRINGYour short prompt: what should happen in the target video.
task_typeCOMBOAuto (decide from the references)Square-bracketed prefix of the summary section. Auto lets the model combine types with ' + '.
reference_roleCOMBOAuto (decide per image)How the attached images should be labelled in subject_definitions.
duration_secondsFLOAT8.01–60
shot_planCOMBOAuto5 options: Auto, Single shot, Two shots, Three shots, Four shots
visual_styleCOMBOAutoIn full-reference mode the style is stated in one or two sentences BEFORE [Shot 1].
wildnessINT250–1000 = literal and conservative, 100 = fully unhinged. Above 40 the node also injects concrete surreal elements picked from the seed.
word_targetINT425150–1200Target length of detailed_description. The guide recommends 350-500 words for generation tasks.
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_languageCOMBOEnglishThe language the characters actually speak, and the tag written inside <d>[...]</d>. Auto lets the model pick one that fits the setting. Pick Custom (or just fill in custom_dialogue_language) for anything not listed.
include_on_screen_textBOOLEANfalse
include_soundscapeBOOLEANtrue
include_non_diegetic_musicBOOLEANtrue
modelCOMBOsonnetClaude Code model alias. `default` uses whatever the CLI is configured for.
researchBOOLEANfalseLet Claude Code search the web for real references before writing - the actual location, wardrobe, lighting and physics. Slower, and it reaches the internet.
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_secondsINT90060–3600How long to wait. H3 prompts take 25-60s; research runs take longer.
seedINT-1-1–18446744073709550000Picks the surreal elements at high wildness, and controls ComfyUI caching. -1 re-rolls and re-runs every queue.
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
reference_notesoptSTRINGOptional per-reference notes, one per line, e.g. 'Image 1: the woman, keep her cardigan'. Also use this to describe video or audio references you cannot attach.
extra_instructionsoptSTRING
custom_dialogue_languageoptSTRINGAny language or dialect not in the dropdown, e.g. 'Norwegian (Bergen dialect)' or 'Latin'. Overrides the dropdown when filled in.
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.

Outputs (9)

NameTypeDescription
h3_promptSTRING
subject_definitionsSTRING
summarySTRING
retention_analysisSTRING
detailed_descriptionSTRING
overall_soundscapeSTRING
non_diegetic_musicSTRING
session_idSTRING
infoSTRING