fabricatio_novel.actions.illustration
Illustration action for enriching novels with ComfyUI-generated images.
Classes
Enrich a novel with LLM-selected and ComfyUI-generated illustrations. |
Module Contents
- class fabricatio_novel.actions.illustration.IllustrateNovel(/, **data: Any)
Bases:
fabricatio_novel.capabilities.illustration.IllustratedNovelCompose,fabricatio_core.ActionEnrich a novel with LLM-selected and ComfyUI-generated illustrations.
- Runs a two-phase pipeline:
Allocate image budget across chapters (LLM-based weighting).
Per chapter: select paragraphs, generate image prompts, call ComfyUI.
Injects
<img>tags directly into chapter content. The companionDumpNovelaction withimage_rootset will register those images as EPUB resources.- novel: fabricatio_novel.models.novel.Novel | None = None
The novel to illustrate. Populated from workflow context via
ctx_override.
- image_root: pathlib.Path | None = None
Root directory for saving generated images (e.g.
./illustrations).
- workflow_template: pathlib.Path | None = None
Path to a ComfyUI API-format JSON workflow file. Defaults to the bundled demo workflow.
- illustration_prompt_guideline: str | None = None
Optional extra guideline for image prompt wording.