Nodes/ComfyUI Rogala Nodes/AlignedTextOverlayImages
ComfyUI Node

AlignedTextOverlayImages

Burn your seed and sampler onto the image so you never forget

By Rogala·Created 6 months ago·Updated 4 months ago· 19
AlignedTextOverlayImages
  • image
  • image
text_templateseed: %KSampler.seed% | steps: %KSampler.steps% cfg: %KSampler.cfg% | %KSampler.sampler_name% | %KSampler.scheduler%
verticalbottom
horizontalright
font_size16
text_colorwhite
bg_colorblack
bg_opacity150
external_text

You know the drill: you run a twelve-image comparison grid, find the one result you love, and then spend ten minutes trying to reconstruct which seed and which sampler produced it. AlignedTextOverlayImages kills that problem by drawing the answer directly onto the image before it gets saved. Give it an image, give it a template, and it renders a multi-line text block into whichever corner you pick.

It sounds like a watermarking utility and it kind of is - but the trick that makes it genuinely useful is template tags. The default template looks like this:

seed: %KSampler.seed% | steps: %KSampler.steps%
cfg: %KSampler.cfg% | %KSampler.sampler_name% | %KSampler.scheduler%

At run time the node resolves those %NodeTitle.param% tags against the live ComfyUI prompt, so it pulls the actual seed, steps, CFG and sampler straight out of your KSampler node - no typing, no drift between what you set and what you burned onto the file.

How it works

Under the hood it's straightforward PIL text rendering using the DejaVu fonts the pack ships with. The text_template is resolved, rendered onto a background rectangle (bg_color, with bg_opacity controlling how see-through that rectangle is), and composited over the image at the anchor you chose. Nothing clever, which is exactly what you want from a node that runs on every single generation.

The alignment inputs are about as self-explanatory as they get: vertical (top/bottom) and horizontal (left/right) pick the corner; font_size ranges 10–50; text_color and bg_color are color-picker enums. Setting bg_color to none gives you a transparent backdrop - useful when your image is already dark and a black box would look like a mistake.

The one non-obvious input is external_text. It's an optional string appended after the resolved template, and it exists to pair with SamplerSchedulerIterator from the same pack: that node outputs the current "sampler | scheduler" pair as text, so you can wire it in and every cell of a sampler grid gets labeled automatically.

Outputs

Just one: image, the input image with the text block composited on top. Stick it between your sampler output and Save Image - or run it twice with different corners if you're feeling fancy.

Installing it

Part of ComfyUI-rogala, so it rides along with the whole pack:

cd ComfyUI/custom_nodes
git clone https://github.com/rogala/ComfyUI-rogala

Restart ComfyUI, find it under rogala → Image → Aligned Text Overlay Images. ComfyUI Manager also works - search "rogala". No extra dependencies, no models to download.

Where people get burned

The %NodeTitle.param% tags only resolve if the node title matches exactly what's shown on the canvas. If you have two samplers in the graph, rename them (right-click → Title, e.g. Sampler_1 and Sampler_2) and reference them explicitly - otherwise every tag resolves against the same node and your grid labels lie to you. The README's example covers this directly: steps: %Sampler_1.steps%. It's the one genuinely fiddly bit, and it's the difference between a useful burn-in and a confusing one.

Categoryrogala/Image

Inputs (9)

NameTypeDefaultDescription
imageIMAGE
text_templateSTRINGseed: %KSampler.seed% | steps: %KSampler.steps% cfg: %KSampler.cfg% | %KSampler.sampler_name% | %KSampler.scheduler%Template text. Use %NodeTitle.param% to embed node values.
verticalCOMBObottomVertical anchor for the text block.
horizontalCOMBOrightHorizontal anchor for the text block.
font_sizeINT1610–50Font size in points.
text_colorCOMBOwhiteText colour.
bg_colorCOMBOblackBackground rectangle colour. Use 'none' for transparent.
bg_opacityINT15050–255Background rectangle opacity (alpha value, 50–255).
external_textoptSTRINGExtra text appended after the resolved template. Connect SamplerSchedulerIterator here to embed the current sampler/scheduler pair.

Outputs (1)

NameTypeDescription
imageIMAGE