PIL TITLE (Mexx)
Add a comic-style title strip to an image without leaving ComfyUI
- image
- result_img
PIL TITLE (Mexx) does one very specific thing: it grows a white band along the top of your image and writes a caption into it. That's it. If you make comics, manga-style pages, posters, or the kind of meme where a picture needs a title bar, this saves you the tab over to an image editor. If you don't, you'll probably never touch it - it's a purpose-built utility, not a general text node.
It's part of the small SoftMeng/ComfyUI-PIL pack (same author as the well-known ComfyUI-DeepCache-Fix, but this is a minor side project with basically no community footprint). The README lists it as "增加留白" - add whitespace - and that's the honest description. It's the sibling of PIL Effects (Mexx), which does the line-art and filter work; this one is strictly the title-strip job.
How it works
Under the hood it's a few lines of Pillow: create a new canvas img_width × img_height + padding_height, paste your image at the bottom, then draw your text centered in the new band at the top, in black, using one of the bundled fonts. Because it's in the same batch-safe wrapper as the rest of the pack, each frame of a batched image gets its own title band.
Inputs that matter
- image - the IMAGE tensor you're captioning.
- image_filter - dropdown with just
NOand留白(whitespace). Leave it on留白. - padding_height - the height of the white band, default 100. This is the dial you'll actually turn: more room for bigger titles.
- font_size - text size, default 60.
- font_name - five Chinese fonts shipped inside the pack (the default is YangRenDongZhuShiTi-Light-2). They handle Latin text fine, but the aesthetic is firmly Chinese poster/comic, which is exactly the use case.
- write_text - your caption. Multiline. The default is the Chinese string "画画的Baby" ("Baby who draws") - if you leave it alone, that's what lands on your image, so change it.
The output is a single result_img IMAGE at the new height, ready to feed a save node or the next step of the graph.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/SoftMeng/ComfyUI-PIL
Then restart ComfyUI. Or search "ComfyUI-PIL" in ComfyUI Manager. No requirements.txt and no models to download - only Pillow and numpy, both already in ComfyUI. The one cost is that the git clone pulls the five .ttf files, roughly 55 MB total.
Gotchas
The band only goes on top - there's no option for a bottom or side caption, so if you want it elsewhere, flip the image first and flip back. The default text and font are Chinese; the bundled fonts render Latin characters but they're display fonts, so long English strings can look off. And the text is always black on white - no color, no outline, no position control. It's a narrow tool, but for manga page titles it's the fastest route from "generated panel" to "looks like a page."
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| image_filter | COMBO | 留白 | 2 options: NO, 留白 |
| padding_height | INT | 100 | — |
| font_size | INT | 60 | — |
| font_name | COMBO | YangRenDongZhuShiTi-Light-2.ttf | 5 options: YangRenDongZhuShiTi-Light-2.ttf, JinNianYeYaoJiaYouYa-2.ttf, CEFFontsCJKMono-Regular.ttf, 庞门正道粗书体6.0.ttf, 白路飞云手写体.ttf |
| write_text | STRING | 画画的Baby | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result_img | IMAGE | — |