ComfyUI Node

Mememizator

Put a white frame and a caption on any generated image — no model required

By ArtemKo7v·Created 4 months ago·Updated 4 months ago· 0
Mememizator
  • image
  • settings
  • image
template
title
subtitle
text_3
text_4

The Mememizator node is the "after" half of a ComfyUI workflow you probably already have. You spent all your effort getting a good image out of the sampler; this node slaps a classic demotivator or meme frame on it, drops a caption underneath, and hands you back a finished IMAGE you can save. It's pure Pillow drawing - no diffusion, no model weights, no VRAM. Feed it a tensor, get a framed meme tensor out.

Why reach for it? Because if you batch-generate images and post them, the captioning is the boring repetitive part, and this makes it deterministic and automatable. A "demotivator" - black background, thin white frame around the image, white caption below - is a format that reads instantly. This is a small niche pack with zero community footprint yet, but for that one job it does it cleanly and never eats a GPU.

How it works

The node converts the input IMAGE tensor to a Pillow image via NumPy, draws the frame and text according to the selected template, and converts the result back to a tensor. The genuinely nice part is the text fitting: it starts the title at its configured size (128px by default) and shrinks it font-size by font-size until the caption fits the available width, then does a second shrink pass if the whole text block overflows the height. Long captions don't spill off the canvas; they just get smaller. It also handles batches - a batch of images in, a batch of framed memes out.

Text comes from up to four fields: title, subtitle, text_3, and text_4. Leave one empty and that block is skipped. Templates define which lines actually render and at what size; out of the box you get Classic Demotivator and Classic Meme, chosen from the template dropdown.

The one thing it needs that isn't in your environment is a font. The demotivator template references impact.ttf, which the node downloads on first use from font.download into ComfyUI/user/default/ComfyUI-Mememizator/fonts/. First render needs internet; after that it's cached.

The inputs that matter

  • image - the required IMAGE input, single image or a batch.
  • template - Classic Demotivator or Classic Meme, straight from the template list in the config.
  • title / subtitle / text_3 / text_4 - the caption lines.
  • settings - optional MEMEMIZATOR_SETTINGS payload from the sibling Mememizator Settings node, for per-workflow overrides.

Output is a single IMAGE tensor, which you wire into a Save Image or preview node. Nothing fancy.

Install

ComfyUI Manager: search for ComfyUI Mememizator and install. Or clone it in by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/ArtemKo7v/ComfyUI-Mememizator
cd ComfyUI-Mememizator
pip install -e .

The package only depends on numpy and pillow; PyTorch comes from ComfyUI itself, and there are no model files to download. Restart ComfyUI after installing.

Where people get burned

  • The font download silently failing. If font.download is unreachable, the node falls back to Pillow's default font and your caption looks nothing like Impact. Check the console for Failed to download font and fetch the TTF yourself into the fonts directory.
  • Config timing. On first launch the node writes its config to ComfyUI/user/default/ComfyUI-Mememizator/config.json. Template names come from that file - if you add a template, restart ComfyUI before expecting it in the dropdown.
  • Restart discipline. Like most custom nodes, this one wants a restart after code changes, dependency installs, or template edits. Skipping it is how you get "why is my template missing."

It's a tiny, honest utility. Not a must-have for everyone, but if you've ever wanted to auto-caption a batch of generated images into demotivators, it's the whole job in one node.

CategoryArtemKo7v

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
templateCOMBO2 options: Classic Demotivator, Classic Meme
titleSTRING
subtitleSTRING
text_3STRING
text_4STRING
settingsoptMEMEMIZATOR_SETTINGS

Outputs (1)

NameTypeDescription
imageIMAGE