章节信息显示
Turn a learning-center chapter into a rendered info card
- image
- chapter_title
The chapter card node
ChapterInfoDisplay is the front door of the pack it ships in. The pack - assemly/comfyui-extras, internally the "ComfyUI 学习中心" (learning center) - is built around tutorial chapters: each chapter is a folder under templates/ holding a metadata.json, an exercise workflow, and an answer workflow. This node takes a chapter ID, reads that metadata, and renders it as a card image with the title, difficulty, a description block, and completion stats. It also hands you the chapter's title as a string.
If you're using the learning center as intended - following the chapters and marking them done - this is how a chapter "looks" inside a workflow. Outside the pack it's useless on its own: it reads chapter folders from the pack's own directory, so it only makes sense where those templates exist.
How it works
You give it chapter_id (STRING, default chapter1_intro). It looks for templates/<chapter_id>/metadata.json, pulls title, description, difficulty, and estimated_time, then checks user_progress/progress.json to see whether you've marked that chapter complete. The rendered card is 768×320: blue header when incomplete, green when done, a difficulty badge (初级/中级/高级), and a stats line like "练习: 有 | 答案: 有".
Outputs:
image(IMAGE) - the rendered card.chapter_title(STRING) - the actual title text, handy if you want to feed it into a text display node or a filename.
If the chapter doesn't exist or the metadata is broken, you don't get a crash - you get an error card image ("找不到章节") with "错误" as the title. Same polite-but-confusing behavior as the rest of this pack: if the card looks wrong, read it.
Gotchas
- Exact folder names.
chapter_idmust match a folder undertemplates/byte for byte:chapter1_intro,chapter2_basics, … and also things likeflux,sd3,hunyuan,stable_cascadethat ship alongside the numbered course. A typo gives you the error card. - Fonts are best-effort. Unlike ProgressIndicator, this node does try to load a CJK font - Windows 微软雅黑/黑体, Linux DroidSansFallback, macOS PingFang. On a minimal Linux box with none of those installed, Chinese text still comes out as tofu.
- It reads the pack's own folders. The template directory lives inside the custom node. If you clone it somewhere odd or prune
templates/to slim the pack down, this node has nothing to show.
Installing
It's one of three nodes in the assemly/comfyui-extras pack. ComfyUI Manager → search "comfyui-extras" or "学习中心", or:
cd ComfyUI/custom_nodes
git clone https://github.com/assemly/comfyui-extras
# restart ComfyUI
Dependencies are just pillow and aiohttp, both already in a stock ComfyUI. No extra models for this node itself - but the tutorial exercises reference HuggingFace model files (a Stable Diffusion 2 inpainting checkpoint among them), so following a chapter can mean a real download.
Verdict
It only makes sense inside this learning-center pack, and the pack is a small, template-y project - the README still points at a placeholder repo URL. If you're working through the chapters, this is how they present themselves. If you're not, you won't need it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| chapter_id | STRING | chapter1_intro | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| chapter_title | STRING | — |