Save HTML
Counter, prefix, and all
ComfyUI users already know the ritual: SaveImage writes ComfyUI_00001.png, then ComfyUI_00002.png, into the output folder, and the counter keeps your generations from clobbering each other. Save HTML borrows that exact machinery and applies it to markup. Feed it an HTML string and it lands in your ComfyUI/output directory as ComfyUI_00001.html, ComfyUI_00002.html, and so on - the same auto-incrementing convention as your images, so everything your workflow produces lives in one place with a predictable naming scheme.
It's the archival half of the ComfyUI_html trio. HTML Download is for one-off grabs into your Downloads folder; this is for keeping a permanent, numbered record next to the images it belongs with.
How it works
The node literally reuses ComfyUI's image-saving path: it calls folder_paths.get_save_image_path with dummy dimensions just to get the same counter, subfolder, and prefix logic SaveImage uses, then writes your HTML out with a .html extension instead of encoding pixels. That's why it behaves exactly like saving an image - right down to the counter incrementing per prefix.
The filename_prefix field supports the same formatting patterns you know from SaveImage:
%date:yyyy-MM-dd%and friends get replaced with the current date/time.%Empty Latent Image.width%-style patterns pull widget values out of other nodes by name.
One honest catch: both of those are resolved by the pack's frontend JavaScript at serialization time, not by the backend. Core get_save_image_path only knows the bare %year%, %month%, %day% patterns. Run this workflow via the API or headless and the fancy patterns will survive literally in the filename.
The inputs
html- the content to save. The tooltip in the node's own schema just says "The HTML to save," which is the whole job description. It'sforceInput, so wire it from anywhere a string can come from.filename_prefix- the prefix for the filename, defaultComfyUI. Add a date pattern here and files start looking like2026-08-26_ComfyUI_00001.htmlinstead of justComfyUI_00001.html.
No outputs - it's an output node, the end of the line.
Install
Search ComfyUI_html in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/filipemeneses/ComfyUI_html
Then restart. No models, no dependencies beyond core.
When it bites
The counter works per prefix: two SaveHtml nodes with different prefixes each start their own sequence, which is usually what you want. And because both the date patterns and the node-value substitution are resolved in the browser, a workflow run via the API or headless will save the literal patterns in the filename - %date:yyyy-MM-dd%_ComfyUI_00001.html is the tell. Files land in the same output folder as your images, so they'll get picked up by whatever you use to browse ComfyUI's output. If you've ever wanted your generated pages filed with the same discipline as your renders, this is the node that gives it to you.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| html | STRING | The HTML to save. | |
| filename_prefix | STRING | ComfyUI | The prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes. |
Outputs (0)
No outputs