Preview EPUB Data
See What the Book Looks Like Before You Burn an Hour of TTS
- epub_data
- original_spine
- rejected
- current_spine
- first_chapter
- last_chapter
This is the pack's diagnostic node, and for an audiobook pipeline it punches well above its size. PreviewEPUB takes the SPINEWALKER object that LoadEPUB produces and dumps out exactly what survived the filtering - before you've committed a TTS model to reading any of it. If you've ever sat through three minutes of a robot narrating a table of contents, you know why that matters.
TTS is slow. A single novel can take hours of generation, and discovering at minute forty that the front-matter filter let a dedication page through means re-generating. PreviewEPUB is the cheap way to check: wire it right after LoadEPUB, look at the outputs, and only then send anything to the splitter and the voice model.
What you get
Five string outputs, all read-only snapshots of the parsed book:
- original_spine - the raw spine as the EPUB declared it, before any filtering. This is what your book came with.
- rejected - every entry LoadEPUB threw out, each tagged with a reason like
skip_keyword:filename,text_too_short,front_matter_filtered, orno_integer_in_filename. This is the useful one: it tells you why the book is missing things, so you know whether to adjustskip_keywordsor fliprequire_int_chapterson the Load node. - current_spine - the surviving content spine after filtering. Read it top to bottom and ask "would I want this read aloud?" If the answer is no, tune the LoadEPUB inputs and run again.
- first_chapter and last_chapter - the bookends of the kept content, handy for a sanity check that the front-matter detection didn't chop off the prologue or keep an afterword.
There's no audio involved and no saving - every output is text meant for a display/preview node so you can eyeball it in the graph. It's also the pack's own input validator: if you accidentally wire something that isn't a SPINEWALKER into it, it raises a clean TypeError that names the problem instead of failing somewhere cryptic downstream.
Where it fits
PreviewEPUB is not strictly required - the pipeline runs fine without it - but think of it as the "lint before you build" step. It costs nothing to keep in the graph while you're iterating on the LoadEPUB filter settings, which is exactly when you'll want it. Once your keyword lists are dialed in for a given book, you can drop it and save the screen space. People who convert a lot of public-domain books tend to keep it in permanently, because every book's front matter is a little different and the rejected output is the fastest way to see what changed.
Install
Same story as the rest of the pack: ComfyUI Manager (search comfyui_epub_tts) or
cd ComfyUI/custom_nodes
git clone https://github.com/kallama/comfyui_epub_tts
then restart. No extra dependencies beyond the pack's trio (ebooklib, bs4, trafilatura), no model downloads. It's a thin node - the whole thing is maybe thirty lines - so if you need to know exactly what it reports, the source at src/comfyui_epub_tts/nodes.py is faster than any documentation that doesn't exist yet.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| epub_data | SPINEWALKER | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| original_spine | STRING | — |
| rejected | STRING | — |
| current_spine | STRING | — |
| first_chapter | STRING | — |
| last_chapter | STRING | — |