Select Chapters
Select Chapters Is the Glue of a Novel-to-Video Pack
- chapter_selection
Select Chapters is the node that keeps a novel-to-video run honest. It lives in
yuyuki's minimax_h3_novel_pipeline,
a pack that does no video generation itself. Read the README and you'll see
the actual job: it reads a text novel, extracts a "reference catalog" of the
characters, locations and objects in each chapter, consolidates those into one
registry so that Alice in chapter 3 is the same Alice as in chapter 7, and
then writes the MiniMax H3 scene prompts you'd feed to a separate
Reference-to-Video node. All of that language-model work runs through LM
Studio's OpenAI-compatible API on your own machine - no MiniMax cloud key, no
LLM phone-home. And the whole chain starts with you pointing this node at some
text files.
It looks like a glorified variable, and honestly, that's the point.
What it actually does
Under the hood Select Chapters is a pass-through. Give it paths, and its
run() returns a little dictionary wrapped in a custom ComfyUI type,
MINIMAX_CHAPTER_SELECTION. It doesn't read the files, doesn't call the model,
doesn't even validate that the chapters exist - that happens later, on the
Extract node, which is where you'll see the error if you pointed at nothing
useful.
So why does a file picker get its own node instead of a text field on Extract
and Generate? Because both of those stages need the same chapter list, and
the output's custom type is ComfyUI's way of enforcing it. Wire
chapter_selection into Extract Chapter References (which builds each
chapter's catalog) and into Generate H3 Prompts (which writes per-chapter
scene prompts), and the two can never drift apart. If they did - you type one
set of paths in Extract and another in Generate - you'd get H3 prompts that
reference picture briefs that were never extracted. The node is a "select
once, fan out" hub, and the type system keeps you from fanning it out wrong.
Folder inputs are scanned non-recursively and sorted naturally, so
chapter_10.md lands after chapter_2.md the way you actually meant. Supported
files are .txt, .md, .markdown and .pdf (PDFs read via pypdf).
The two inputs that matter
There are only two, and you'll mostly touch the first:
chapter_paths- a multiline string, one chapter file or folder per line, relative to ComfyUI's input directory. As the author's own tooltip says, "Relative paths start there." This is the field you type into.saved_chapter- a dropdown of chapters you've previously uploaded through the node's picker button. Handy for re-runs, but notechapter_pathswins if both are set; leave it blank unless you're reusing an upload.
It has no lmstudio_config input, which makes it the one node in the pack you
can drop on the canvas and execute without an LM Studio server even running.
Installing it
You install the whole pack - this node can't come alone:
cd ComfyUI/custom_nodes
git clone https://github.com/yuyuki/minimax_h3_novel_pipeline
python -m pip install -r minimax_h3_novel_pipeline/requirements.txt
Use the Python that runs ComfyUI (the embedded one, on portable installs), then
restart and refresh the browser. The pack's real dependencies are thin - the
OpenAI SDK, httpx and pypdf - and the node shows up under MiniMax H3
Novel alongside the other six. ComfyUI Manager users can just search
"MiniMax H3 Novel" or the repo title ComfyUI-Minimax_H3_Novel_Pipeline.
You'll also need Python 3.10+.
Where people get burned
The one real trap is path discipline. Chapter paths must stay inside
ComfyUI's input directory (ComfyUI/input); absolute paths elsewhere and
.. traversal are rejected. If your novel lives on your Desktop and Extract
answers with "No supported chapter files found.", that's this rule biting -
copy the chapters in or use the picker button on the node, which uploads into
input/minimax_h3_novel/ and fills chapter_paths for you. Refresh after
uploading and they appear in saved_chapter.
Two smaller notes. The picker and the LM Studio settings only work over a
direct local browser connection to ComfyUI (like http://localhost:8188) -
remote, cross-origin and forwarded-proxy requests are rejected, so if you're
hitting ComfyUI through a tunnel, type paths instead of clicking. And remember
this node is inert on its own: nothing happens until its output reaches Extract
or Generate, so if you're testing and "nothing runs," check your wiring, not
the picker.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| chapter_paths | STRING | One chapter file or folder per line, inside ComfyUI's input directory. Relative paths start there. | |
| saved_chapter | COMBO | Previously uploaded chapter. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| chapter_selection | MINIMAX_CHAPTER_SELECTION | — |