๐ HTML Previewer (Local)
Render live HTML inside ComfyUI's floating panel โ and refresh it on cue
- preview_url
ComfyUI is great at showing you images, but sometimes what you want to see is a web page - an HTML preview of your 3D model, a report, a styled dashboard of outputs. The HTML Previewer (Local) does exactly that: it takes HTML content, serves it over ComfyUI's own HTTP server, and pops it into a draggable floating panel in the UI. And because it's wired for auto-refresh, it'll update live whenever you run the workflow again.
It's the display layer for the whole pack. The HiTem3D 3D Preview node and the History node both produce HTML strings, and this is the natural way to actually look at them without leaving ComfyUI. It's also genuinely useful on its own - paste in any HTML you want to inspect.
How it works
The node is a wrapper around a small HTTP route it registers with ComfyUI's backend (/html_previewer/open). Give it content one of three ways:
html_content- raw HTML. The node hashes it, saves it to a temp file, and serves that. The most foolproof option.absolute_path- a full path to an existing.htmlfile.base_dir+file_name- split the path, for when you want to point atindex.htmlin a folder.
Out the other side is a single preview_url string. What makes it interesting is auto_refresh_token: append any changing string (a timestamp, a counter) and it gets baked into the URL as a query parameter, forcing the panel to reload on each run. That's the whole point of the pack's Dynamic Value Generator - it exists to feed changing tokens into this input so your preview refreshes on every queue.
The serving is deliberately locked down: the route rejects remote URLs, only serves .html/.htm files, and only from allowed roots (ComfyUI's output directory plus the pack's temp folder). A Content-Security-Policy header is set to keep the served pages from doing anything too wild.
Wiring it up
Two patterns you'll actually use:
DynamicValueGenerator โ dynamic_value โ HTMLPreviewer.auto_refresh_token
HiTem3DPreviewNode โ preview_html โ HTMLPreviewer.html_content
That second one is how the example workflows get an auto-refreshing 3D preview panel. There's a web/html_previewer_panel.js extension in the pack that provides the floating panel UI.
Installing
Via ComfyUI Manager (search "ComfyUI HiTem3D Integration") or:
cd ComfyUI/custom_nodes
git clone https://github.com/GeekatplayStudio/comfyui-hitem3d
cd comfyui-hitem3d
pip install -r requirements.txt
Restart ComfyUI afterward. Deps are just requests and Pillow.
Where people get burned
- "Previewer not available - missing server imports." The node needs ComfyUI's server modules (
PromptServer,fastapi) to register its route. If you see this, you're running in an environment where those imports failed - restart ComfyUI fully, and check nothing else is squatting on the same port. - 403 "Path not allowed." You pointed at a file outside the allowed roots (output dir + temp dir). Either move the file into the output directory or switch to
html_contentmode. - Nothing refreshes. If
auto_refresh_tokenstays empty, the URL never changes, so the panel shows the old content. Feed it a changing token from the Dynamic Value Generator. - Blank page. If you're serving a page that references other local files (CSS, JS), remember only the single HTML file is served - external scripts need real URLs.
It's a small node with one job, but it's the thing that makes "preview a 3D model" feel like part of ComfyUI instead of a trip to a browser tab. Pair it with the Dynamic Value Generator and it quietly keeps itself current.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| base_diropt | STRING | โ | |
| file_nameopt | STRING | โ | |
| absolute_pathopt | STRING | โ | |
| auto_refresh_tokenopt | STRING | โ | |
| html_contentopt | STRING | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| preview_url | STRING | โ |