Create Dialog Image V2
The Dialogue Node That Skips the wkhtmltopdf Hassle
- background_image
- IMAGE
If you've looked at CreateDialogImage and bounced off the wkhtmltopdf requirement, this is the version you actually want. CreateDialogImageV2 does the same job - render a comic/visual-novel dialog box with an optional name label and composite it onto a background image - but it swaps the fragile imgkit+wkhtmltoimage pipeline for headless Chrome via Selenium. Same inputs, same output, and one less external binary to install and pray about.
That's the whole pitch of the V2 in this pack: the V1 nodes hardcode a Windows path to wkhtmltoimage.exe, which makes them a chore on Linux and Mac. The V2 nodes render with the browser you already have. The trade-off is that V2 trades one dependency for another - you now need Selenium and a working chromedriver, and the pack's requirements.txt doesn't install Selenium for you. Nothing is free, but at least Chrome is something most ComfyUI users already have around.
How it works
The node builds the dialog HTML (name pill + rounded box), then renders it in a headless Chrome window using a data: URL, with Emulation.setDefaultBackgroundColorOverride forcing a transparent page background so the box stays cut-out. After a couple of seconds' settle time it screenshots, converts to RGBA, and crops the top few pixels. That transparent box gets pasted onto your background_image with PIL, positioned top/bottom and left/center/right, with dialog_optimize trimming the empty margin under bottom-placed dialogue.
One deliberate difference from V1: the default font_family here is Noto Color Emoji instead of Segoe UI Emoji, which is the whole reason the V2 exists - better emoji and color-glyph support across platforms. If emoji rendering as boxes has been your dialog-node problem, this is the fix.
The inputs that matter
Identical surface to V1, and you'll still only touch a handful:
background_image- requiredIMAGEinput; wire a VAE-decoded scene in, or the node won't run. It composites the box onto whatever you feed it.dialog_content- the dialogue, multiline, Markdown-aware.label_content/label_enabled- the name pill ("Dr. Aeda"); disable it for a bare box.dialog_bkg_color- defaults torgba(255, 105, 180, 0.5). Keep it RGBA for translucency.dialog_position(top/bottom),dialog_alignment(left/center/right),image_width/image_height(the box's footprint, 840×210 by default - keep it smaller than the background).font_family- set to Noto Color Emoji by default, but it's just a string; any installed font works.
Everything else (label_font_size, dialog_font_size, border color/width, label position and width, dialog_optimize, colors) is styling.
Output is a single IMAGE - background plus dialog composited - for SaveImage, PreviewImage, or feeding into video/frame pipelines.
Installing
ComfyUI Manager: search ComfyUI_MarkdownImage and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/dasilva333/ComfyUI_MarkdownImage
Restart. No models to download. Then, because the pack's requirements file doesn't cover this node:
pip install selenium
and make sure Chrome/Chromium plus a matching chromedriver are installed and on your PATH. Version mismatch between driver and browser is the classic failure here, and it shows up as a SessionNotCreatedException at run time, not load time.
Troubleshooting
WebDriverException/ session-not-created errors -chromedrivermissing or version-mismatched with your Chrome. Update the driver to match.- Nothing renders / white box - headless Chrome in this node renders a local
data:URL, so unlike the pack'sCreateMarkdownImageV2, there's no CDN dependency to fail on. If the screenshot comes back blank, test with a plaindialog_contentfirst (no Markdown, no special characters) to isolate whether the page or the parsing is the problem. - Box placed oddly - the footprint (
image_width/image_height) is bigger than the background, or proportions don't match the scene. Shrink the dialog canvas.
Honest expectation-setting: this pack has essentially no community footprint anywhere - there are no help threads to search, so plan to debug the Selenium layer yourself. It's ordinary, solvable stuff, but it's not click-to-work on every machine. If you're on Windows with wkhtmltopdf already installed and working, V1 is zero extra effort; for everyone else, V2 is the better bet.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| label_content | STRING | Dr. Aeda | — |
| label_enabled | COMBO | true | 2 options: true, false |
| label_position | COMBO | right | 2 options: left, right |
| label_font_size | INT | 288–64 | — |
| label_font_color | STRING | #C71585 | — |
| label_width | INT | 18050–4096 | — |
| dialog_content | STRING | The quick brown fox jumped over the lazy dogs. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | — |
| dialog_bkg_color | STRING | rgba(255, 105, 180, 0.5) | — |
| dialog_font_color | STRING | white | — |
| dialog_font_size | INT | 268–64 | — |
| dialog_border_color | STRING | white | — |
| dialog_border_width | INT | 61–20 | — |
| dialog_position | COMBO | bottom | 2 options: top, bottom |
| dialog_alignment | COMBO | center | 3 options: left, center, right |
| dialog_optimize | COMBO | true | 2 options: true, false |
| font_family | STRING | Noto Color Emoji | — |
| image_width | INT | 84016–4096 | — |
| image_height | INT | 21016–4096 | — |
| background_image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |