成就证书生成器
Your ComfyUI diploma, printed without a GPU — the achievement certificate node
- custom_image
- image
This node prints you a certificate for finishing ComfyUI lessons - and it's the rare ComfyUI node that doesn't touch a model, a sampler, or the GPU at all. It's the reward half of the comfyui-learningcenter pack (学习中心, "Learning Center"), a Chinese-language tutorial plugin that teaches ComfyUI from zero through chapters of guided exercises. When you mark chapters as done in its built-in UI, AchievementCertificate reads your progress and renders a 1024×768 certificate image with your name, your achievement rank, a mascot, and a border. Queue it on an empty graph and it just works - no wires required, since every input is a widget.
How it actually works
The interesting bit is where the rank comes from. The node reads user_progress/progress.json from the pack's own directory, counts the keys in completed_chapters, and maps that number to one of six ranks: 初学者 (1 chapter), 学徒 (5), 实践者 (10), 专家 (20), 大师 (30), 宗师 (50). Then it draws the certificate with PIL - background, border, the Opai mascot from resources/opai.png, and your text - converts the result to a tensor (torch if available, otherwise a plain numpy array), and hands you an IMAGE output. It also drops a copy in your system temp folder and prints the path to the console, in case you want the PNG directly.
A genuinely cute detail: the README whispers about a hidden achievement, and the code backs it up. Use all five Opai mascot styles (正常/欢呼/鼓掌/学术帽/随机) across your runs and it unlocks the "Opai粉丝" (Opai Fan) badge, tracked in user_progress/hidden_achievements.json.
The inputs that matter
There are nine widgets plus two optional sockets. A beginner only needs to touch a few:
- user_name - put your actual name here. The default is literally "请输入你的姓名" ("please enter your name"), and if you queue without changing it, that's what prints on the certificate. Ask me how I know this is a trap.
- achievement_title - the headline, defaults to "ComfyUI学习成就".
- certificate_style - 标准/卡通/复古/未来科技/手绘风, plus border_style (简约/金色华丽/像素风 and others) and bg_color, which includes a transparent option.
- font_size (10–100), text_color (8 colors), show_mascot and mascot_style for the Opai character.
The optional custom_image (IMAGE) replaces the stock background, and fun_quote (STRING) adds a line of text - which is where you can wire in the companion AchievementInfo node's output for an auto-updating stats line.
The output is one IMAGE tensor. Since this is an output node, it shows up in the UI directly; wire it into a Save Image / Preview Image node to keep your diploma.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/assemly/comfyui-learningcenter.git
then restart ComfyUI (or search "comfyui-learningcenter" in ComfyUI Manager - the pack's display name is "Learning Center"). Dependencies are light - pillow, aiohttp, numpy, opencv-python - and there are no model downloads, which makes this one of the quickest installs you'll do.
Where people get burned
First, the rank is computed from chapters you complete in the Learning Center UI's "标记为已完成" flow - not from anything in your graph. Fresh install with no progress? You're 初学者, no matter how many workflows you've shipped. Second, fonts: on Windows the code loads 微软雅黑 (msyh.ttc) or 黑体; on Linux/macOS it silently falls back to PIL's default bitmap font, which can't render Chinese - you get tofu boxes. If you're not on Windows, plan to run this inside a workflow where you don't care, or bring your own background via custom_image. None of it is hard; just don't expect magic on a fresh box.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| user_name | STRING | 请输入你的姓名 | — |
| certificate_style | COMBO | 标准 | 5 options: 标准, 卡通, 复古, 未来科技, 手绘风 |
| achievement_title | STRING | ComfyUI学习成就 | — |
| font_size | INT | 3010–100 | — |
| text_color | COMBO | 黑色 | 8 options: 黑色, 白色, 红色, 蓝色, 绿色, 金色, +2 |
| bg_color | COMBO | 白色 | 7 options: 白色, 透明, 金色, 淡蓝色, 淡绿色, 渐变蓝, +1 |
| show_mascot | COMBO | 是 | 2 options: 是, 否 |
| mascot_style | COMBO | 正常 | 5 options: 正常, 欢呼, 鼓掌, 学术帽, 随机 |
| border_style | COMBO | 简约 | 6 options: 无, 简约, 金色华丽, 线条, 气泡, 像素风 |
| custom_imageopt | IMAGE | — | |
| fun_quoteopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |