Nodes/MiniMax H3 Novel Pipeline/Load Cinematic Chapters
ComfyUI Node

Load Cinematic Chapters

The Node That Saves You Re-Adapting the Entire Book

By yuyuki·Created 2 months ago·Updated 11 days ago· 3
Load Cinematic Chapters
    • cinematic_chapters
    • saved_files
    ◄cinematic_path►

    Load Cinematic Chapters is the cheapest node in the MiniMax H3 Novel Pipeline and possibly the most useful one, because it's the one that stops you paying for the same language-model pass twice.

    Here's the shape of the problem it solves. Cinematic Chapter Adapter reads your chapters and asks a local LM Studio model to break each one into ordered sequences with an initial state, events, and an ending state. On a full novel that's hundreds of requests and it takes real time. But the adaptation is the part of the pipeline that changes least - you adapt once, then you spend the next week fiddling with consolidation thresholds, editing character designs, and re-generating H3 prompts. Without this node, every one of those iterations drags the adaptation pass behind it.

    What it does

    One input, two outputs, zero model calls. cinematic_path takes either a folder of saved *.cinematic.json files or a single one of those files, and it gives you the same cinematic_chapters payload the adapter returns, ready to wire into Extract Chapter References.

    The path is resolved inside output/minimax_h3_novel, so a value like 20260911153042/cinematic_chapters means the cinematic_chapters folder of a specific earlier run. Absolute paths work only if they stay inside that root; .., symlinks and junctions that escape it are rejected. Point it at a folder and it globs *.cinematic.json and sorts naturally, so 002_chapter.cinematic.json lands before 010_chapter.cinematic.json rather than after it. That's the reason the adapter names files with a zero-padded index prefix - the loader depends on it.

    Then it validates. Every loaded chapter needs a non-empty chapter_name, a non-empty sequences list, strictly increasing positive sequence IDs in the order supplied (it never re-sorts sequences for you), a string source on each sequence, and an adaptation containing all three of initialState, event and endingState as strings, at least one of them non-blank. Fail any of those and you get an error naming the offending file.

    Outputs are cinematic_chapters → Extract Chapter References' cinematic_chapters input, and saved_files - the loaded paths as one newline-separated string, for logging or for chaining into something that reads paths.

    One difference worth knowing before you queue: this is not an output node. The adapter can terminate a workflow on its own and previews its output; the loader can't. It's a pass-through, so it needs Extract (or whatever else consumes MINIMAX_CINEMATIC_CHAPTERS) downstream or your queue does nothing interesting.

    Install

    Same pack, same install as everything else in it - Manager → MiniMax H3 Novel Pipeline, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yuyuki/ComfyUI-Minimax_H3_Novel_Pipeline
    python -m pip install -r ComfyUI-Minimax_H3_Novel_Pipeline/requirements.txt
    

    Restart ComfyUI and refresh the browser after installing; the chapter picker lives in the pack's bundled web/js and won't appear otherwise.

    The loader itself needs nothing from LM Studio - no URL, no key, no loaded model. That's the point of it: this half of the workflow is offline and instant. Keep the LM Studio Configuration node wired to Extract though, since that stage still calls the model.

    Where people get burned

    • "Cinematic chapter path does not exist." You gave a path relative to the wrong place. It's relative to output/minimax_h3_novel, not to output/ and not to your ComfyUI root.
    • Hand-editing the JSON breaks it. Reasonable thing to do - fix one bad sequence, drop a hallucinated event. But the validation is strict about sequence IDs being positive, unique and increasing in array order, and about all three adaptation strings existing. Add an entry with sequence: 0, or reorder two sequences without renumbering, and the load dies.
    • A stale adaptation loads happily. The loader checks structure, not freshness. If you edit the chapter .txt after adapting, nothing here notices, and the downstream extraction quietly runs on the old adaptation. Re-run the adapter for chapters you've changed.
    • The folder is empty because the run failed. Verification is done per file, but files only exist for chapters that completed. The adapter persists each chapter as it finishes, so a crash halfway through leaves a partial folder - which the loader will take, sorted, without complaint. Check the file count before you trust it.
    • Mixing chapters from different runs. Nothing stops you pointing at a folder assembled from two runs. If those adaptations used different models or chunk_chars, the sequence granularity won't match and your continuity will be subtly inconsistent.

    The workflow this node enables is the one you'll actually want after the first pass: Load Cinematic Chapters → Extract → Consolidate → Generate, with the adapter bypassed entirely, so you can iterate on everything downstream of the expensive step.

    CategoryMiniMax H3 Novel

    Inputs (1)

    NameTypeDefaultDescription
    cinematic_pathSTRINGFolder containing *.cinematic.json files, or one saved cinematic chapter JSON file. Must be inside output/minimax_h3_novel; relative paths start there.

    Outputs (2)

    NameTypeDescription
    cinematic_chaptersMINIMAX_CINEMATIC_CHAPTERS—
    saved_filesSTRING—