VRGDG Prompt JSON Subject Prepender
How this pack keeps a character consistent
- prompt_json
- json_text
- json_output
- prompt_count
The single biggest complaint you'll see about AI music videos is character consistency - the main character drifts across scenes, and by minute two they barely resemble the reference image. VRGameDevGirl's pack attacks that problem with brute-force prompt engineering, and VRGDG_PromptJsonSubjectPrepender is the node that does it.
Its job is dead simple: take a subject description and prepend it to every single prompt in your "prompt map" JSON. The prompt map is the pack's per-scene prompt structure - a JSON object where each key is a scene and each value is that scene's prompt. Scene 1 gets "the woman with the silver bob, leather jacket - [scene 1 prompt]", scene 2 gets the same subject string, and so on. Every scene starts by naming the subject, which is exactly the kind of repetition diffusion models respond to.
How it works
Four inputs:
subject- the description to prepend. Make it tight and specific: this string repeats verbatim in every scene prompt, so it's the single highest-leverage text in the workflow.prompt_json- the prompt-map JSON as text. Paste it or wire it from a previous node.separator- what goes between subject and prompt. Default", ", which works with most CLIP-family tokenizers.skip_if_already_starts_with_subject- default on, and leave it on. It checks whether a prompt already starts with the subject and skips it, so you don't end up with "the woman, the woman, [prompt]" on the third scene.
Outputs: json_text (the edited JSON as a string, for wiring into string-based nodes), json_output (a JSON-typed port for nodes that expect real JSON), and prompt_count (how many prompts it touched - handy as a sanity check that your map parsed right).
Where it fits
It slots right before your prompt-splitting nodes. The LLM node writes a prompt map; this node stamps the subject onto every scene; the splitters then hand each scene its prompt to the video generator. That ordering matters - prepend after the LLM writes the map, not before, or the LLM's per-scene creativity gets drowned by the repeated subject boilerplate.
One caveat from the community's experience with this workflow: prompt repetition helps, but it won't rescue a scene that needs a completely different character moment. People still train character LoRAs and generate reference images per location for the hard scenes. Think of this node as raising the floor on consistency, not guaranteeing it.
Installing it
It's in the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
restart, or ComfyUI Manager → search vrgamedev. No model downloads for this one - it's a pure string transform.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| subject | STRING | — | |
| prompt_json | * | {} | — |
| separator | STRING | , | Text inserted between the subject and each prompt. |
| skip_if_already_starts_with_subject | BOOLEAN | true | Avoids adding the subject twice when a prompt already starts with it. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| json_text | STRING | — |
| json_output | JSON | — |
| prompt_count | INT | — |