Nodes/comfyui-sequential-batcher/📂 Project Plan Loader
ComfyUI Node

📂 Project Plan Loader

How the second flow reads the plan the first flow's LLM already wrote

By Meisoftcoltd·Created 7 months ago·Updated 18 days ago· 3
📂 Project Plan Loader
    • agent_json
    • scene_count
    • plan_path
    audio_filename

    If you've looked at the pack's DynamicSceneDirector, you may have wondered about the split-workflow pattern it implies: Flow 1 runs an LLM to turn a script into a JSON scene plan, and Flow 2 - the heavy video render - shouldn't have to re-run that LLM on every chunk. ProjectPlanLoader is the reading end of that bargain. It loads the plan JSON Flow 1 saved to disk and hands it to Flow 2's Director, no model, no API call, no repetition.

    The tooltip says it all: connect the audio_filename input to the current_file_name output of the pack's Audio Batch Selector. The filename isn't a label here - it's the key that locates the plan file.

    How it works

    It rebuilds the exact same path the DynamicSceneDirector uses when saving: take audio_filename, strip it to alphanumerics plus spaces, underscore, and dash (so my_audio.mp3 becomes my_audio), and look for <output_dir>/<name>_plan.json. The output directory is ComfyUI's standard output folder, so the file lives somewhere you can actually inspect. It reads the raw JSON, parses it, counts the scenes array, and returns all three to you.

    Two design details worth knowing. It's IS_CHANGED-always-true, meaning it deliberately re-reads the file from disk every time - you can edit the plan in a text editor mid-render and the next chunk picks up your change. And if the plan file is missing, it raises a hard error instead of silently returning nothing. That's the intended fail-fast behavior; the error message even tells you to run Flow 1 first.

    Inputs and outputs

    • audio_filename (STRING) - from the Audio Batch Selector's current_file_name, or type it to match whatever Flow 1 used.

    Outputs:

    • agent_json (STRING) - the raw plan JSON, wired into the Director's agent_json input.
    • scene_count (INT) - how many scenes the plan has.
    • plan_path (STRING) - full path to the file, useful for debugging or chaining.

    Installing it

    It's part of comfyui-sequential-batcher:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Meisoftcoltd/comfyui-sequential-batcher
    

    or ComfyUI Manager, search "comfyui-sequential-batcher", restart. No extra dependencies - this node is pure filesystem + JSON.

    Common issues

    The one error you'll actually hit is the missing-plan failure: No se encontró el plan de proyecto. It means Flow 1 never ran (or saved under a different audio filename). Make sure both flows use the same audio_filename, and remember the sanitization - scene_01.wav and scene 01.wav resolve to different keys than you might expect. There's no LLM here to fall back on, so the plan file genuinely has to exist.

    Category🔁 Sequential Batcher/Director

    Inputs (1)

    NameTypeDefaultDescription
    audio_filenameSTRINGConectar al 'current_file_name' del Audio Batch Selector

    Outputs (3)

    NameTypeDescription
    agent_jsonSTRING
    scene_countINT
    plan_pathSTRING