Nodes/ComfyUI-Omnivoice/OmniVoice EPUB Loader
ComfyUI Node

OmniVoice EPUB Loader

Turn an EPUB into a whole audiobook inside ComfyUI

By ethanfel·Created 5 months ago·Updated 5 months ago· 6
OmniVoice EPUB Loader
    • text
    • chapter_title
    • chapter_list
    epub_path
    chapter_start1
    chapter_end1

    OmniVoice EPUB Loader is the node that makes the whole pack make sense. ComfyUI-Omnivoice is built around a zero-shot TTS model (k2-fsa's OmniVoice, 600+ languages, diffusion-based) that can read arbitrarily long text with near-constant VRAM. That's only interesting if you can get long text in without copy-pasting chapter by chapter. This node is the "in" - point it at an .epub, pick a chapter range, and it hands OmniVoice Generate clean plain text, ready to voice.

    It's the front of the audiobook pipeline the pack's README ships: EPUB Loader → Generate → Save Audio, with a fixed seed on every Generate node so the voice stays consistent from chapter to chapter. Honestly, if you're not here for audiobooks you probably don't need this node - for a single line of dialogue you'd just type text into Generate. But for "I want my book narrated," this is the piece that turns ComfyUI into a batch audiobook factory.

    How it works

    No AI magic here - it's a plain EPUB parser. It reads META-INF/container.xml to find the OPF manifest and spine, walks each chapter's XHTML, strips out scripts, styles, and headings, and collapses the mess into clean paragraphs. The selected chapters come out joined by --- so Generate treats them as separate sections. It's pure Python plus BeautifulSoup (which the pack installs via requirements.txt), so it's fast and needs zero GPU.

    The inputs and outputs that matter

    Three inputs, all obvious:

    • epub_path - the absolute path to your .epub. Relative paths and drag-and-drop won't fly here; paste the full path.
    • chapter_start - first chapter to include, 1-indexed.
    • chapter_end - last chapter, inclusive. Both get clamped to the actual chapter count, and if end is below start it silently becomes start, so you can't break it by being sloppy.

    Outputs:

    • text - the selected chapters, joined, ready for Generate.
    • chapter_title - the title of the first selected chapter. You'll thank it when you're naming output files per chapter.
    • chapter_list - a numbered list of every chapter title in the book, for eyeballing which range you actually want before you commit.

    text is the one you wire forward. chapter_list is a reference; chapter_title is a nice-to-have for filenames.

    Installing it

    Same deal as the rest of the pack: it lives in ethanfel/ComfyUI-Omnivoice. Easiest path is ComfyUI Manager - search "OmniVoice" and hit install. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ethanfel/ComfyUI-Omnivoice.git
    

    then restart ComfyUI. Manager runs install.py, which installs the omnivoice package with --no-deps (more on why below), and requirements.txt handles the rest. The first time a Generate node runs, the model downloads from HuggingFace to ComfyUI/models/omnivoice/ - that's the big download, several GB, so don't panic if the first run hangs on a progress bar.

    Common issues

    • "File not found" on a path you can see. It needs an absolute path; a path relative to the ComfyUI folder usually fails.
    • DRM-locked EPUBs won't parse. De-DRM the file first (Calibre's plugin is the usual route) - the node can only read the internal XHTML if the zip contents are readable.
    • Dependency gotcha that bites the whole pack: the omnivoice pip package pins torch==2.8.* from a CUDA 12.8 index. Installed normally it would nuke ComfyUI's torch build, which is why install.py uses --no-deps. If you installed manually and skipped that step, a working loader can suddenly fail on import - reinstall with pip install omnivoice --no-deps.

    A note on output: audio comes out at 24kHz and hooks straight into ComfyUI's Save Audio / Preview Audio nodes, so the only thing between you and a finished chapter is the diffusion step count on Generate. Start at the default 32 and drop to 16 if chapters are taking forever.

    CategoryOmniVoice

    Inputs (3)

    NameTypeDefaultDescription
    epub_pathSTRINGAbsolute path to the .epub file to load.
    chapter_startINT11–9999First chapter to include (1-indexed). Clamped to valid range automatically.
    chapter_endINT11–9999Last chapter to include (1-indexed, inclusive). Clamped automatically. If less than chapter_start, set to chapter_start.

    Outputs (3)

    NameTypeDescription
    textSTRING
    chapter_titleSTRING
    chapter_listSTRING