Nodes/VRGameDevGirl Video Enhancement Nodes/VRGDG Prompt JSON Subject Prepender
ComfyUI Node

VRGDG Prompt JSON Subject Prepender

How this pack keeps a character consistent

By vrgamegirl19·Created about a year ago·Updated about 7 hours ago· 718
VRGDG Prompt JSON Subject Prepender
  • prompt_json
  • json_text
  • json_output
  • prompt_count
subject
separator,
skip_if_already_starts_with_subjecttrue

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.

CategoryVRGDG/General

Inputs (4)

NameTypeDefaultDescription
subjectSTRING
prompt_json*{}
separatorSTRING, Text inserted between the subject and each prompt.
skip_if_already_starts_with_subjectBOOLEANtrueAvoids adding the subject twice when a prompt already starts with it.

Outputs (3)

NameTypeDescription
json_textSTRING
json_outputJSON
prompt_countINT