连环画批量导出(PNG/JPG/PDF)
Export the comic as PNGs, JPGs, and a PDF — for printing or editing
- images
- export_dir
- summary
The HTML viewer is great for sharing; this node is for when you need files. 连环画批量导出(PNG/JPG/PDF) takes your comic image batch and writes every page as an individual image file, a plain-text file of the narration, and - optionally - a single PDF combining everything. It's the print-and-edit path out of the workflow: drop the pages into an editor, send them to a printer, or hand over a PDF that looks like a real book.
How it works
It saves each page of the IMAGE batch as page_01.png, page_02.png, ... (the prefix is configurable) into a timestamped folder under your ComfyUI output directory - output/<timestamp>_<title>/<output_subdir>/ - alongside a story_texts.txt containing each page's narration. If export_pdf is on, it then assembles a PDF with one page per image, optionally including the text. PDF generation is done with reportlab, which is not a core dependency of the pack - it's in requirements.txt, so a normal pip install -r requirements.txt gets it, but if you skipped that or hit a broken install, the PDF silently degrades to "not generated" while the images still save fine.
Inputs that matter
- images (required) - the comic batch, from
DoubaoComicBookNode.comic_images. - story_structure (optional) - the narration text; used for the text file and the PDF's text layer. Leave empty for images-only export.
- title / output_subdir / filename_prefix - name the folder and files.
- image_format - png (lossless, for editing) or jpg (smaller, for sharing). jpg_quality 10–100, default 92.
- export_pdf - on by default; pdf_with_text embeds narration into the PDF; pdf_filename names it.
Outputs are export_dir (the folder path where everything landed) and summary (a report of what was written).
Install & setup
Same pack, same one-time install:
cd ComfyUI/custom_nodes
git clone https://github.com/xuchenxu168/ComfyUI_doubao_seed
cd ComfyUI_doubao_seed
pip install -r requirements.txt
Restart ComfyUI, find it under Ken-Chen/Doubao. If PDFs matter to you, confirm reportlab imported cleanly (python -c "import reportlab").
Gotchas
Two things to know. First, the PDF path embeds Chinese text via a system font (the code looks for msyh.ttc on Windows, Noto CJK on Linux) - if the font is missing you get a PDF with garbled or missing narration, and on a bare Linux box you'll want sudo apt-get install fonts-noto-cjk (the README says exactly this). Second, this node is pure local work - no API calls, no key, no cost - so it's also your emergency off-ramp: if the API is down or your balance runs out, you can still export images you already generated.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| story_structureopt | STRING | — | |
| titleopt | STRING | 我的连环画 | — |
| output_subdiropt | STRING | comic_export | — |
| filename_prefixopt | STRING | page_ | — |
| image_formatopt | COMBO | png | 2 options: png, jpg |
| jpg_qualityopt | INT | 9210–100 | — |
| export_pdfopt | BOOLEAN | true | — |
| pdf_with_textopt | BOOLEAN | true | — |
| pdf_filenameopt | STRING | comic_story.pdf | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| export_dir | STRING | — |
| summary | STRING | — |