Nodes/PIP Artistic Words for ComfyUI/PIP Artistic Text Generator
ComfyUI Node

PIP Artistic Text Generator

The ComfyUI node that actually draws your text, instead of hoping the model spells it right

By chenpipi0807·Created about a year ago·Updated 7 days ago· 30
PIP Artistic Text Generator
  • image
  • IMAGE
text
seed0
style
color_matchdisable
margin_top0.25
margin_bottom0.15
margin_left0.10
margin_right0.10
opacity1.00
debug_info

Diffusion models are famously bad at rendering text - they'll happily give you a sign that says "LONDON" when you asked for "HELLO", and the longer the phrase, the worse the spelling. This node takes the other route: instead of begging the model, it draws your text onto the image with Pillow, applying styled effects defined in SVG files. It's the flagship node of the small PIP_ArtisticWords pack (chenpipi0807's "艺术文字生成器"), and it's the reason people install the pack at all.

What it does

You feed it an image, type the text you want, pick a style, and it returns a new image with that text rendered on top - auto-sized, word-wrapped, and placed inside a "safe area" so glow and shadow effects don't get chopped off at the frame edges. Think posters, thumbnails, watermark-style titles, meme captions that actually read correctly.

How it works

Every style is an SVG file in the pack's SVG/ folder. On load, StyleManager parses each one and converts it into a style dict (gradient fill, outline, drop shadow, inner shadow, outer glow). TextRenderer then fits your text into the safe area - it picks a font size and wraps on word boundaries so multi-word text stays on one tidy block. EffectsProcessor layers on the effects, and the result is alpha-composited over your background image. Nothing here touches a model: it's Pillow + OpenCV + numpy, so it runs in well under a second even on CPU.

The inputs that matter

  • image - your background. It's required.
  • text - the string to draw. Multiline, so paste in whatever.
  • seed - 0 means random every run; set it to reproduce a specific random style/font combo.
  • style - one of the 14 bundled styles (new-cyberpunk, new-luxury-gold, new-matrix-code, new-pastel-dream…) or random.
  • color_match - enable only does anything when style is random: it samples the image's dominant color and picks a matching style from config/style_color_mapping.json. Nice trick, but it overrides your random choice.

The optional margin floats (margin_top 0.25, margin_bottom 0.15, margin_left/margin_right 0.1) define the safe area as fractions of image size - the one thing you'll actually tune when text gets clipped. opacity scales the whole overlay, and debug_info (none/basic/detailed) dumps style internals to the console when you're hunting a weird render.

Output: a single IMAGE tensor, ready for Save Image or to chain into whatever post-processing you like.

Installing it

Use ComfyUI Manager (search "PIP Artistic Words") or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/chenpipi0807/PIP_ArtisticWords.git
cd PIP_ArtisticWords
pip install -r requirements.txt

Then restart ComfyUI. Dependencies are light - Pillow, numpy, opencv-python, and webcolors; torch is already in ComfyUI. No model downloads, no GPU requirement for these nodes.

Where people get burned

  • New styles need a restart. Drop an SVG into SVG/ and the dropdown won't see it until ComfyUI reloads. That's by design - styles are scanned at startup.
  • Font licensing is your problem. The repo ships 方正风雅宋 (a 17 MB CJK font) plus four Latin fonts, and the README says it outright: "字体版权问题请自行了解后使用" - check the license before you use the pack's fonts in commercial work.
  • The node prints on every run. Even with debug_info set to none, there's an unconditional console line about the input image shape. Harmless, just noisy.
  • Chinese UI labels. The pack's author writes in Chinese; several sibling nodes use Chinese parameter names. This node is the exception - its labels are English.

If text lands partially outside the frame, raise the margins. That's the single most common fix, and it's the one the author calls out too.

CategoryPIP

Inputs (11)

NameTypeDefaultDescription
imageIMAGE
textSTRING
seedINT00–18446744073709550000
styleCOMBO15 options: random, new-platinum-chrome, new-luxury-gold, new-retro-vintage, new-royal-purple, new-kawaii-bubble, +9
color_matchCOMBOdisable2 options: disable, enable
margin_topoptFLOAT0.250.05–0.8
margin_bottomoptFLOAT0.150.05–0.8
margin_leftoptFLOAT0.100.05–0.8
margin_rightoptFLOAT0.100.05–0.8
opacityoptFLOAT1.000.1–1
debug_infooptCOMBO3 options: none, basic, detailed

Outputs (1)

NameTypeDescription
IMAGEIMAGE