Nodes/VRGameDevGirl Video Enhancement Nodes/VRGDG LongShot Keyframe Director Context
ComfyUI Node

VRGDG LongShot Keyframe Director Context

VRGDG LongShot Keyframe Director Context

By vrgamegirl19·Created about a year ago·Updated a day ago· 742
VRGDG LongShot Keyframe Director Context
    • keyframe_planner_instructions
    ◄director_plan—►
    ◄image_modelGPT Image 2►
    ◄chunk_duration7.5►
    ◄allow_cutsfalse►
    ◄reference_setupno reference images►
    ◄image_1_roleprotagonist►
    ◄image_2_rolelocation►
    ◄extra_image_direction►

    What it is

    The second half of the LongShot planning stage. You already have a story plan - the JSON the Auto Director produced. This node takes that plan and writes one long instruction asking an LLM for four separate, standalone 16:9 image prompts plus a shared continuity bible, in strict JSON.

    No API call, no model. It's a prompt builder, and it decides whether your four keyframes look like four frames of one scene or four unrelated stock photos.

    The distinction from the node it follows matters: Auto Director Context plans the story and the chunks; this one plans the pictures - camera position, subject state, lighting, and how each composition physically connects to the next. Same LLM setup, run back to back.

    How it works

    The instruction it emits is long and specific. The load-bearing parts:

    Keyframe mapping, in real seconds. Keyframe 1 is global 0.000 s, the exact first frame of chunk 1. Keyframes 2, 3 and 4 are the last frames of chunks 2, 3 and 4 - computed as chunk_duration × 2, × 3, × 4. If you tell this node a different chunk_duration than the one you planned the story with, the times it demands are wrong and everything downstream inherits the mistake.

    Camera continuity, driven by allow_cuts. Off, the LLM is told this is one continuous physical take: every camera position must be reachable from the last one in the available time, keep lens behaviour and screen direction, don't cross through walls or people, and don't fake a cut with an occlusion wipe. On, cuts are permitted but identity, wardrobe, geography, props and lighting stay continuous across them. It also bans composition changes that are "just a zoom or crop" - a changed view has to reveal what's physically on the other side of the characters. That's a genuinely good rule and it's why these four frames tend to read as a sequence rather than a slideshow.

    Reference fidelity. Whatever you declare in reference_setup and the two role dropdowns becomes a contract. The prompt tells the LLM that a character sheet describes one person - no panel layouts, labels, blanked faces or studio backgrounds dragged into the story image - and that a location reference defines architecture and light sources, so show it from the required camera position rather than copying its exact view.

    Output contract. Strict JSON, no fences: a continuity_bible string plus exactly four objects with keyframe, workflow_role, global_time_seconds, camera_position, subject_state, handoff_logic and image_prompt. Each image_prompt must be standalone and 1,200 characters or fewer - the extractor enforces that, so a chatty model here becomes a hard error one node later.

    Inputs that matter

    director_plan is a forceInput string - you drag the link from your LLM node; there's no typing in it. Then image_model (GPT Image 2 / Nano Banana / generic image model) tunes the phrasing to the generator you actually use, chunk_duration which must match the plan, and allow_cuts.

    reference_setup plus image_1_role / image_2_role describe the up-to-two images you'll attach on the LLM node - roles include multi-character cast sheet, wardrobe and visual style inspiration. extra_image_direction is your free-text catch-all ("keep her hands clear of the strings") and it's the one field here that is purely yours.

    One output: keyframe_planner_instructions, a STRING, into VRGDG LLM Multi with the references attached.

    Install

    Manager → Install Custom Nodes → search vrgamedev, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl.git
    python -m pip install -r comfyui-vrgamedevgirl/requirements.txt
    

    Restart ComfyUI and hard-refresh the page. Compared with the rest of the pack this node needs nothing extra - no VHS, no model files - but the requirements install it pulls in is the whole video-production toolbox, llama-cpp-python and voxcpm included, and those two are where it stalls on a machine without a compiler.

    When it goes wrong

    • Nothing but a JSON parse error downstream. Your LLM wrapped the answer in Markdown fences and prose. Fences are stripped, surrounding commentary is tolerated by slicing between braces - but two JSON objects or a preamble containing { will break it.
    • The extractor complains about keyframe 3 missing. The model returned three or five keyframe objects. Bigger models do this less; naming the failure back to the model ("return exactly four objects numbered 1–4") usually fixes it in one retry.
    • Prompts over the character limit. The extractor raises with the exact length. There's no override, so shorten the direction or use a model that respects instructions.
    • Keyframes look gorgeous and don't connect. Almost always because chunk_duration or allow_cuts here disagrees with the Auto Director settings. These two nodes can't see each other's widgets, so set them deliberately.

    One honest limitation: this is prompting discipline, not a validated illusion. If your model can't hold four characters' wardrobe straight across four prompts, no node in the chain fixes that for you.

    CategoryVRGDG/Video/Long Shot

    Inputs (8)

    NameTypeDefaultDescription
    director_planSTRING—
    image_modelCOMBOGPT Image 23 options: GPT Image 2, Nano Banana, generic image model
    chunk_durationFLOAT7.51–60—
    allow_cutsBOOLEANfalse—
    reference_setupCOMBOno reference images3 options: no reference images, image 1 only, images 1 and 2
    image_1_roleCOMBOprotagonist8 options: protagonist, second character, multi-character cast sheet, location, product, creature or prop, +2
    image_2_roleCOMBOlocation8 options: protagonist, second character, multi-character cast sheet, location, product, creature or prop, +2
    extra_image_directionSTRING—

    Outputs (1)

    NameTypeDescription
    keyframe_planner_instructionsSTRING—