Nodes/IAMCCS-nodes/IAMCCS Cine PromptRelay Adapter
ComfyUI Node

IAMCCS Cine PromptRelay Adapter

The adapter that turns a shotboard plan into PromptRelay's format

By IAMCCS·Created 11 months ago·Updated 7 days ago· 113
IAMCCS Cine PromptRelay Adapter
    • global_prompt
    • local_prompts
    • segment_lengths
    • segment_count
    • report
    plan_json{}
    global_prompt
    local_prompt_lines
    role_linesreference 1: field / character A reference 2: reverse field / character B reference 3: room / wide shot reference 4: insert / beat detail
    segment_modeplan_keyframes
    include_global_in_localno
    merge_short_segmentsyes
    min_segment_frames4
    default_local_promptcinematic continuity, natural motion, coherent staging

    PromptRelay wants its data in a specific shape: a flat list of local prompts and a matching list of segment frame lengths. Shotboard planners produce a much richer structure - keyframes with references, roles, camera notes, timings. IAMCCS Cine PromptRelay Adapter is the translator between those two worlds. It takes a plan_json from the Cine planners and the prompts you've written, and emits exactly the local_prompts + segment_lengths pair a PromptRelay encoder is hungry for.

    If you've built any PromptRelay workflow by hand, you know the tedium this kills: counting frames per segment, making sure the pipe-joined prompts line up with the comma-joined lengths, and re-doing it every time you move a keyframe. This node does all of that from the plan.

    How it works

    The core input is plan_json - the keyframe/entry list produced by the Cine planners (it reads an entries array with per-entry frame, and reference data). Then segment_mode decides how segments are derived:

    • plan_keyframes (default) - segments come from the plan's actual keyframe positions.
    • even_by_entries - split the timeline evenly by entry count.
    • single_scene - one big segment.

    role_lines describes what each reference slot represents ("reference 1: field / character A", etc.), and local_prompt_lines lets you write per-segment prompts with placeholders: {label}, {role}, {ref}, {start}, {end}, {frames}, {global}. If a segment has no prompt, default_local_prompt fills in.

    Two quality-of-life switches:

    • include_global_in_local - append the global prompt into every local prompt (usually no, PromptRelay already has the global).
    • merge_short_segments + min_segment_frames - merge segments shorter than the minimum so you don't get a 3-frame prompt that's pure noise.

    Outputs: global_prompt, local_prompts, segment_lengths, segment_count (great sanity check), and report.

    Install

    One node in IAMCCS-nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/IAMCCS/IAMCCS-nodes.git
    

    or Manager → search IAMCCS. README floor: ComfyUI ≥ 0.3.0, Python ≥ 3.12, Torch ≥ 2.8. Needs ComfyUI-PromptRelay downstream to be useful.

    Where people get burned

    • Feeding it the wrong JSON. It expects the Cine plan format (entries with frame). If you paste an arbitrary JSON from a different tool, it silently degrades to single_scene/fallback behavior and your segment_count will look wrong. The report output shows what it actually parsed - check it before blaming the encode.
    • Prompt fragments instead of sentences. The placeholder system composes text from pieces; if your local_prompt_lines uses {role} and the role text ends mid-phrase, you get broken grammar. Write template lines that read well with your role strings.
    • Merging you didn't ask for. merge_short_segments defaults to yes. If you genuinely want a 2-frame flash cut as its own segment, flip it off or lower min_segment_frames.
    • Zero search impressions, one-author tooling. This is squarely an internal glue node - if you're not using the Cine planners, there's no reason to adopt it, since it assumes their plan format.
    CategoryIAMCCS/Cine/02 Single Generation

    Inputs (9)

    NameTypeDefaultDescription
    plan_jsonSTRING{}
    global_promptSTRING
    local_prompt_linesSTRINGOptional. One line per PromptRelay segment, or use | separators. Supports {label}, {role}, {ref}, {start}, {end}, {frames}, {global}.
    role_linesSTRINGreference 1: field / character A reference 2: reverse field / character B reference 3: room / wide shot reference 4: insert / beat detail
    segment_modeCOMBOplan_keyframes3 options: plan_keyframes, even_by_entries, single_scene
    include_global_in_localCOMBOno2 options: no, yes
    merge_short_segmentsCOMBOyes2 options: yes, no
    min_segment_framesINT41–100000
    default_local_promptSTRINGcinematic continuity, natural motion, coherent staging

    Outputs (5)

    NameTypeDescription
    global_promptSTRING
    local_promptsSTRING
    segment_lengthsSTRING
    segment_countINT
    reportSTRING