Nodes/ComfyUI_doubao_seed/连环画批量导出(PNG/JPG/PDF)
ComfyUI Node

连环画批量导出(PNG/JPG/PDF)

Export the comic as PNGs, JPGs, and a PDF — for printing or editing

By xuchenxu168·Created 12 months ago·Updated 9 months ago· 19
连环画批量导出(PNG/JPG/PDF)
  • images
  • export_dir
  • summary
story_structure
title我的连环画
output_subdircomic_export
filename_prefixpage_
image_formatpng
jpg_quality92
export_pdftrue
pdf_with_texttrue
pdf_filenamecomic_story.pdf

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.

CategoryKen-Chen/Doubao

Inputs (10)

NameTypeDefaultDescription
imagesIMAGE
story_structureoptSTRING
titleoptSTRING我的连环画
output_subdiroptSTRINGcomic_export
filename_prefixoptSTRINGpage_
image_formatoptCOMBOpng2 options: png, jpg
jpg_qualityoptINT9210–100
export_pdfoptBOOLEANtrue
pdf_with_textoptBOOLEANtrue
pdf_filenameoptSTRINGcomic_story.pdf

Outputs (2)

NameTypeDescription
export_dirSTRING
summarySTRING