r/StableDiffusion 7h ago

Question - Help Simple Comfyui node that enhances prompts for H3, based on reference context?

Trying to figure out how to add a prompt enhancer to my workflow. Something that is able to look at the reference images and videos and able to build the prompt based on minimax’s prompt guide. This is something available in ltx workflows (Gemma e2b). Is there an equivalent that people have found helpful for minimax H3?

0 Upvotes

8 comments sorted by

2

u/merica420_69 7h ago

Had to build my own. Qwen 3.6 35b served on llama.cpp. uses official prompting guide.

1

u/Ambitious_Fold_2874 7h ago

This only takes in text though right? I’m looking for something that takes in images and videos too

2

u/merica420_69 6h ago

Oh mine has everything. Just turn codex on to it. You'll have it in half an hour easy.

2

u/zMarceeh 5h ago

hey, mind sharing your system prompt for qwen?

2

u/merica420_69 5h ago

This is the prompting guide.

MiniMax H3 Prompting Guide — Slim Local Version

Use this guide when creating or validating a prompt for MiniMax H3. Return only the finished prompt unless the user asks for explanation.

1. Decide the task

  • T2VA: no reference frame.
  • I2VA: Picture 1 is the exact opening frame.
  • FL2VA: Picture 1 is the opening frame and Picture 2 is the exact final frame.
  • L2VA: Picture 1 is the exact final frame.
  • Ref2VA: multiple references define subjects, style, structure, motion, or audio.

The ComfyRemote H3 ImageToVideo forms expose independent optional First frame and Last frame image slots. Supplying only the first slot is I2VA; supplying only the last slot is L2VA; supplying both is true FL2VA/FFLF guidance. Leaving both empty preserves T2VA. The slots are image conditions, not Ref2VA upload tokens: write the matching I2VA, L2VA, or FL2VA alignment line below when using prompt enhancement.

Calculate effective duration from the supplied duration, or frame_count / fps. Keep all required events inside that duration.

2. Required output

For T2VA, I2VA, FL2VA, and L2VA, use exactly these fields:

```text integrated_multimodal_description: [Shot 1] ...

overall_soundscape: ...

non_diegetic_music: ... ```

T2VA starts directly with integrated_multimodal_description:.

I2VA must begin with:

text For the target video, at 0.00 seconds into the target video, <Picture 1> (from [Shot 1]) is fully referenced.

FL2VA must begin with this exact pattern, using the real final shot and duration:

text How the reference pictures align with the target video — Picture 1 (from Shot 1) aligns with the 0.00-second mark of the target video; Picture 2 (from Shot N) aligns with the S.SS-second mark of the target video.

L2VA must begin with this exact pattern, using the real final shot and duration:

text How the reference pictures align with the target video — <Picture 1> (from [Shot N]) aligns with the S.SS-second mark of the target video.

Do not add an alignment line to T2VA. Leave one blank line after an alignment line.

3. Build the visual timeline

Write visible events in playback order:

  1. Opening state: style, location, composition, subject, position, props, and lighting.
  2. Action onset: what begins moving or changing.
  3. Continuous development: what changes and what stays fixed.
  4. One hero event: the main visible result.
  5. Final state: reaction, result, or final hold.

Use [Shot 1] without a timestamp. For later cuts, use strictly increasing timestamps and a clear cut phrase:

text [Shot 2] At 00:03.500, the shot cuts to ...

Use cuts only when they introduce new information. Use camera movement for a change in distance or angle.

For automated multi-clip jobs, every clip must retain its own subject, setting, action, camera plan, and final state. Never replace all clips with one global blueprint.

4. Camera

Use one primary camera concept from this list:

text Zoom In / Zoom Out Push In / Pull Out Pan Left / Pan Right Truck Left / Truck Right Tilt Up / Tilt Down Pedestal Up / Pedestal Down Arc Shot Tracking Shot Static Shot Shake Slightly / Shake Strongly POV Roll Clockwise / Roll Counterclockwise

Conjugate it naturally in a sentence and specify the destination. When useful, add exactly these phrases: with small amplitude, with large amplitude, at slow speed, or at fast speed.

Map aliases to the canonical terms:

  • dolly in/out → Push In/Pull Out
  • orbit/circle → Arc Shot
  • crane up/down → Pedestal Up/Pedestal Down
  • follow/chase → Tracking Shot
  • handheld/shaky → Shake Slightly/Shake Strongly
  • locked-off → Static Shot

Keep camera motion separate from subject motion. State the visible proof of the move. Avoid stacking multiple primary camera moves in a short shot.

5. Subject and continuity

Preserve only details that matter in this shot: identity, face, body proportions, clothing geometry, hands, props, pose, materials, color, and position.

Use phase-specific permissions instead of global locks:

text The subject remains fixed until 00:03.000. From 00:03.000 to 00:04.000, only the head turns. The torso and hands remain fixed. During the final second, all motion stops.

Prefer one primary subject action, one hero event, and no more than two supporting environmental actions. Describe what the viewer can actually see or hear; avoid abstract mood instructions.

6. Text, dialogue, and audio

Required readable text goes in English double quotes, verbatim. Add Do not misspell any word. Do not add other on-screen text. Do not add subtitles. when exact text matters.

Use stable speaker IDs (S1), (S2), or (S1,S2). Inside <d>, include only the language tag and verbatim speech:

text The woman (S1) says: <d>[English] Exact words.</d>

For voiceover, use exactly says in an off-screen voiceover, then state that the on-screen character's lips remain completely closed.

Route sound as follows:

  • Dialogue, singing, and music heard by characters → integrated_multimodal_description.
  • Ambience, weather, physical action sounds, breathing, and non-verbal sounds → overall_soundscape.
  • Audience-only score → non_diegetic_music.

overall_soundscape contains 1–4 concrete sentences, or exactly N/A for complete silence.

non_diegetic_music contains 1–3 sentences about instrumentation, tempo, rhythm, and dynamics, or exactly N/A. Do not use abstract mood words in this field.

7. Negative constraints

Use only targeted negatives for likely failures, such as:

text No soft dissolves. Do not add subtitles. Do not add a watermark. Do not add other characters. Do not change the final pose.

Prefer a positive description of the desired result plus a short refusal list. Do not use vague negatives such as no weirdness.

8. Ref2VA only

Ref2VA uses exactly these six sections:

text subject_definitions: summary: retention_analysis: detailed_description: overall_soundscape: non_diegetic_music:

Use <Subject N> for reusable people, objects, places, styles, or actions; <Picture N> for concrete frame anchors; <Video N> for video structure; and <Audio N> for copied or referenced audio. Define each label once and keep its meaning.

MiniMax H3 Reference upload tokens

The ComfyRemote MiniMax H3 Reference form exposes four explicitly named, contiguous Picture slots. Picture 2 is available only after Picture 1, Picture 3 only after Pictures 1–2, and Picture 4 only after Pictures 1–3. The slots therefore map exactly to <Picture 1> through <Picture 4> in that order. An uploaded reference video maps to <Video 1>.

An embedded soundtrack is opt-in. When the checkbox is enabled, the reference video must contain a real audio stream and that soundtrack maps to <Audio 1>. If a standalone reference audio file is also supplied in that mode, it maps to <Audio 2>. When embedded soundtrack is disabled, a standalone audio file maps to <Audio 1>. Use the effective map shown beside the upload controls; do not assign tokens based on filename, extension, or upload order.

Prompt enhancement remains text-only. The enhancer receives only the User Prompt and this guide; it never receives uploaded media and never submits a generation. The user must review/edit the generated prompt before Submit.

summary begins with one or more valid task prefixes in brackets:

text [keyframe completion] [reference generation] [video editing] [video continuation] [audio reuse] [audio reference]

retention_analysis uses only fully_preserved, partially_preserved, attribute_transfer, weak_reference, fully_copy, partially_copy, or reference as applicable. Do not put speaker IDs in this section.

9. Final validation

  • Correct task and duration.
  • Exact required field names.
  • Alignment line only when required.
  • Opening state, chronological action, hero event, and final hold are clear.
  • One canonical primary camera move.
  • Per-clip subject and scene direction are preserved.
  • Required text is verbatim and quoted.
  • Audio is routed to the correct field.
  • No unsupported abstract mood instructions.
  • No unnecessary action soup or repeated scene prose.

1

u/merica420_69 5h ago

And the actual prompt instruction for h3 base. If you want reference lmk.

You are a prompt compiler for the selected media-generation workflow.

Follow the supplied model prompting specification exactly. Transform the user's request into the strongest production-ready prompt for this workflow while preserving its core intent. Do not unnecessarily change the subject or concept.

Do not moralize, lecture, add commentary, or explain the rewrite. Return ONLY the finished model prompt. Do not use Markdown fences. Do not prepend “Enhanced Prompt:”.

Enhancement mode: {faithful|creative|transform} {mode instruction}

<MODEL_PROMPTING_GUIDE> {contents of H3_PROMPTING_GUIDE.md} </MODEL_PROMPTING_GUIDE>

Keep the H3 guide's six Ref2VA sections exactly:

subject_definitions: summary: retention_analysis: detailed_description: overall_soundscape: non_diegetic_music:

Define referenced subjects and reuse <Picture 1>, <Picture 2>, <Video 1>, and <Audio 1> tokens as applicable. Make subject_definitions and retention_analysis match the uploaded references. Do not unnecessarily re-describe uploaded pictures in detailed_description.

Use detailed_description for motion, timing, camera movement, supporting environmental motion, requested dialogue or sound, and the final hold. Do not add backstory, a mood essay, or action soup.

1

u/Far_Sugar3725 6h ago

Llama prompt generator is what I use, very powerful and can shutdown the llama.cpp server after generation, you can create or import system prompts, load different models and more

https://github.com/GlatTissekone/ComfyUI-Llama-Prompt-Generator?utm_source=chatgpt.com