Nodes/ComfyUI_MieNodes/加载剧本 · Load Script Asset 🐑
ComfyUI Node

加载剧本 · Load Script Asset 🐑

Your storyboard is a JSON file on disk — this node is how it gets into the graph

By MieMieeeee·Created 2 years ago·Updated 5 days ago· 280
加载剧本 · Load Script Asset 🐑
    • storyboard
    • status
    • text
    ◄library_dir►
    ◄name(下拉选择剧本 · pick script)►

    If you've looked at the MiniMax H3 loop pipeline and bounced off it, the reason is usually the same: it wants a plan_json, and a plan_json is a fairly grim thing to write by hand. The storyboard track in ComfyUI-MieNodes exists to fix that, and Load Storyboard Asset|Mie is the front door - the node that reads one hand-authored storyboard file off your disk and hands it to the graph as a single wire.

    Where it sits

    A MiniMax H3 loop workflow is a chain of very short clips that have to agree with each other: same characters, same room, dialogue that continues, <Picture N> references that point at the right person every scene. The H3 model itself does 4–15 second clips, so anything longer is a planning problem, not a generation problem. MieNodes splits the work in two: you author the plan as data, and a code-only node converts that data into the prompt structure H3 expects.

    That middle object - the plan - is what this node feeds. It deliberately isn't prose. The storyboard JSON holds your cast, your shots, your dialogue lines verbatim, your style prefix, and a few housekeeping switches (pacing, seed policy, camera discipline). Load Storyboard Asset reads it, validates it hard, and outputs a MIE_STORYBOARD bundle you wire into either BuildPlanFromStoryboard|Mie or MiniMaxH3LoopPromptGeneratorV3|Mie.

    The bundle is the same pattern you see in rgthree's context nodes and every "pipe" pack in the ecosystem: one fat object on one wire instead of twelve primitive wires. Great for legibility, and - worth knowing up front - it hides its own contents, so when the plan comes out wrong you debug by opening the JSON, not by tracing sockets.

    Inputs and outputs

    Two required inputs, both boring:

    • library_dir - leave it blank to use the machine default ($MIE_ASSET_LIBRARY if you've set it, otherwise the asset_library folder inside the pack itself). It must be an absolute path if you type one at all; a relative path is rejected outright. Set it once, put it on every asset node, forget it.
    • name - a dropdown of storyboards it found in <library_dir>/storyboards/. Fresh installs show only the placeholder (下拉选择分镜 · pick storyboard), which is the node telling you it has nothing to load yet.

    The outputs are storyboard (MIE_STORYBOARD - wire this downstream) and status (STRING). status reads ok (<absolute path to the json>), which is the fastest way to confirm which file you actually loaded, because storyboards live one directory deep and it's easy to have three copies.

    Installing it

    The whole pack goes in, not the one node:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
    cd ComfyUI-MieNodes && pip install -r requirements.txt
    

    …then restart ComfyUI. Or skip the shell and search MieNodes in ComfyUI Manager - the pack is published to the Comfy registry under publisher mie as comfyui_mienodes, so Manager can install and update it. The requirements are all ordinary Python (imagehash, pillow, toml, deepdiff, requests, huggingface_hub, pyyaml, opencv-python, soundfile) - no CUDA builds, no pinned torch, which is rarer than it should be. There are no model downloads for any of the storyboard nodes: they're file I/O and string assembly.

    What actually goes wrong

    The dropdown is the main tripwire. It's populated from disk when the node is added, so a storyboard you saved after the node was created isn't in the list yet - press R to refresh it. The author's own tooltip says this because everyone hits it.

    Past that, this node is strict on purpose. Version must be exactly 1; there's no migration path, and an old file just errors. The name inside the JSON must equal the directory name on disk, because a mismatch is exactly the signature of "I copied a file and forgot to edit it". If the file fails validation you get the absolute path in the error - open that file, don't guess.

    And if you haven't written a storyboard yet, you have nothing to load. Go author one first: Save Storyboard Asset|Mie takes pasted JSON and writes it to the library. The pair is the entire authoring loop, and neither of them touches a model.

    Category🐑 MieNodes/🐑 Assets

    Inputs (2)

    NameTypeDefaultDescription
    library_dirSTRING—
    nameCOMBO(下拉选择剧本 · pick script)剧本名 · Script name:下拉选要加载的剧本; 改写手头一次保存后请按 R 刷新下拉。

    Outputs (3)

    NameTypeDescription
    storyboardMIE_STORYBOARD—
    statusSTRING—
    textSTRING—