ComfyUI Node

VRGDG_PromptSplitterJson

The JSON-aware splitter with a summary port on the side

By vrgamegirl19·Created about a year ago·Updated about 7 hours ago· 718
VRGDG_PromptSplitterJson
    • text_output_1
    • text_output_2
    • text_output_3
    • text_output_4
    • text_output_5
    • text_output_6
    • text_output_7
    • text_output_8
    • text_output_9
    • text_output_10
    • text_output_11
    • text_output_12
    • text_output_13
    • text_output_14
    • text_output_15
    • text_output_16
    • summary_output
    prompt_text{"prompt1": "example text", "prompt2": "another one", "summary": {"scene_summary": "...", "character_arc": "...", "narrative_thread": "...", "next_scene_suggestion": "..."}}
    file_path
    index0

    VRGDG_PromptSplitterJson is the most self-documenting node in the pack's splitter family, because its default input is basically a tutorial. The prompt_text field ships prefilled with a JSON example showing you exactly what it expects - a prompt map with scene entries plus a nested summary object containing scene_summary, character_arc, narrative_thread, and next_scene_suggestion.

    That structure tells you what this node is really for: it's the one that understands the LLM node's richer output format. When the Qwen node in this pack writes a prompt map, it can include a running summary of the story so far - the character arc, the narrative thread, and a suggestion for what should happen next. This splitter parses that format, hands you each scene's prompt on its own port, and gives the summary its own dedicated output.

    How it works

    One required input:

    • prompt_text - the JSON prompt map as text, in the format shown in the default: scene keys plus a summary object.

    Two optional inputs:

    • file_path - load the prompt map from a file instead of pasting text. Leave empty to use the text input.
    • index - which scene to pull (0 to 999, zero-based). Set it if you want one scene; the node still exposes all ports.

    Outputs: text_output_1 through text_output_16 for scenes, and - the differentiator - summary_output, a STRING carrying the whole summary block. That summary port is gold if you're building the pack's "continuous story" behavior, where the next batch of scenes is generated knowing what happened in the last.

    Why the summary matters

    Music videos aren't thirty unrelated clips - they tell a story, and the pack's approach keeps that thread alive by having the LLM maintain a running narrative. This splitter is the plumbing that carries the thread forward: the summary feeds back into the next prompt-generation pass, so scene 14 "knows" the character arc from scenes 1–13. Lose the summary and your video turns into a shuffle of unconnected vignettes.

    Installing it

    Part of the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
    

    restart, or ComfyUI Manager → search vrgamedev. No model downloads.

    Gotchas

    The file_path input takes a path, not file contents - if you paste a path and nothing changes, that's expected behavior when the path doesn't exist. And keep the input JSON valid: this node parses, it doesn't repair. If your LLM emitted broken JSON, run it through VRGDG_PromptMapJsonFixer first.

    CategoryVRGDG

    Inputs (3)

    NameTypeDefaultDescription
    prompt_textSTRING{"prompt1": "example text", "prompt2": "another one", "summary": {"scene_summary": "...", "character_arc": "...", "narrative_thread": "...", "next_scene_suggestion": "..."}}
    file_pathoptSTRING
    indexoptINT00–999

    Outputs (17)

    NameTypeDescription
    text_output_1STRING
    text_output_2STRING
    text_output_3STRING
    text_output_4STRING
    text_output_5STRING
    text_output_6STRING
    text_output_7STRING
    text_output_8STRING
    text_output_9STRING
    text_output_10STRING
    text_output_11STRING
    text_output_12STRING
    text_output_13STRING
    text_output_14STRING
    text_output_15STRING
    text_output_16STRING
    summary_outputSTRING