Create Markdown Image V2
CreateMarkdownImageV2
- IMAGE
You generate a gorgeous scene, and then you stare at it thinking "this needs words on it." That's what every node in the dasilva333/ComfyUI_MarkdownImage pack is for, and CreateMarkdownImageV2 is the one most people end up on - it's the only node in the pack with any real search traffic, and it's easy to see why once you try it.
It renders Markdown text into an image with a matching border, fit to exact dimensions, and hands you back a normal IMAGE tensor you can wire straight into a Save or Preview node. Think subtitle bars, meme text, a caption under a character shot, or the dialogue block you'll composite onto a scene. No diffusion involved, no models to download, and - the name is a lie, sort of - it calls no API and needs no key. It drives a real browser under the hood, though, and that's where the fun starts.
How it works
V1 of this pack's Markdown node renders through imgkit/wkhtmltoimage. V2 ditches that entirely and spins up headless Chrome via Selenium: the node takes your inputs, URL-encodes them into a query string, loads a bundled test5.html file with those parameters, and screenshots it. The HTML uses the jQuery textFit plugin to size the text into the box, then the screenshot gets converted to a float32 tensor in ComfyUI's usual [0,1] range.
That swap matters for two reasons. First, no wkhtmltopdf binary needed - the V1 nodes in this pack hardcode a Windows path to that executable, which breaks on Linux and Mac. Second, it means Chrome and chromedriver must actually be installed, and that's the catch: selenium isn't in the pack's requirements.txt, so a bare Manager install won't make this node work.
The inputs that matter
There are six, and you'll touch about three:
md_text- the actual content, a multiline string. The default is a two-speaker dialogue with colored<b>name tags and<br>line breaks; that's the format this node is built around, so use raw HTML inline for color and line breaks rather than trying to make Markdown do it.image_width/image_height- the output canvas. Defaults are 1024×200, a wide caption strip; match this to whatever you're compositing onto.theme- the one fun input. Pick betweenpastel,rose,barbie,preppy,neutral-sky, andyellow-tan. These are whole visual themes (background, text, text-shadow stack), not just colors.barbieis exactly as loud as you'd hope.
border_color and border_size do what they say - a colored frame around the rendered text.
The output is one IMAGE tensor (no masks, no RGBA alpha), so it's a drop-in for SaveImage, PreviewImage, VHS video compositing, or even feeding back into an img2img pass if you want the text burned into the generation rather than overlaid.
Installing
ComfyUI Manager can find it by searching ComfyUI_MarkdownImage, or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/dasilva333/ComfyUI_MarkdownImage
then restart ComfyUI. That's it for the pack itself - no model files, it's a handful of Python files, MIT licensed. But for this node you also need:
pip install selenium
plus a Chrome/Chromium install and a matching chromedriver on your PATH. If chromedriver is missing you'll get a WebDriverException the moment the node runs, not at load time.
Troubleshooting
- "SessionNotCreatedException: This version of ChromeDriver only supports Chrome version X" - your driver and browser versions don't match. Update one to match the other.
- Slow runs - the code sleeps a fixed 5 seconds to let the page settle before the screenshot. That's by design, so don't go hunting for a bug; batch carefully.
- Blank or unstyled output offline -
test5.htmlloads jQuery and the textFit plugin from CDN URLs. No internet at render time means a broken page. (A localjquery-1.10.1.min.jsships in the repo but the HTML points at the CDN.) - Text comes out in ALL CAPS - not a bug: the bundled page applies
text-transform: uppercase. It's part of the look; if it's not the look you want, V1 lets you control this more directly.
One thing to know before you set up: this is a genuinely niche pack, and there's essentially zero community write-up of it anywhere - if you hit a wall, you'll be debugging the Selenium side yourself, not pasting an error into r/comfyui and getting an answer back.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| md_text | STRING | <span style="color: #C71585;"><b>Girl:</b></span> Do you think the bunnies are watching us? 🐰<br> <span style="color: #00008B;"><b>Man:</b></span> Only to wish they could be as happy as we are. 😂 | — |
| border_color | STRING | #FFFF00 | — |
| border_size | INT | 10–100 | — |
| image_width | INT | 102416–4096 | — |
| image_height | INT | 20016–4096 | — |
| theme | COMBO | pastel | 6 options: pastel, rose, barbie, preppy, neutral-sky, yellow-tan |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |