Load HTML
The node that pulls your hand-written markup back into the graph
- STRING
- filename
If your workflow is an LLM writing HTML, eventually you'll want the reverse: a hand-authored file to start from. Load HTML reads a .html file from ComfyUI's input folder and hands its contents to the graph as a string - the entry point for "I designed this in an editor, now let the model fix or extend it" workflows. It's the input half of the pack; pair it with HTML Preview to see what you loaded and Save HTML to write the result back out.
How it works
The node lists every .html file sitting in your ComfyUI/input directory and puts them in a dropdown. Pick one and it reads the file as UTF-8 and returns the content. Two details make it behave like a real loader rather than a dumb reader:
- It detects changes. The node implements
IS_CHANGEDby hashing the file contents, so if you edit the file on disk, ComfyUI re-runs the node on the next queue - no stale cached copy. (This is the "always refresh when the file changes" pattern, done correctly with a content hash rather than theNaNtrick that poisons the cache.) - It's drag-and-drop friendly. The bundled JS adds an upload button and drop/paste handling, so you can drop a local HTML file onto the node and it gets uploaded into your input folder. It'll even pull files in from the
pastedsubfolder.
The inputs and outputs
The only input is html_file, a dropdown of the .html files in your input directory.
It returns two things:
STRING- the full contents of the file. This is what you wire into an LLM node, a string primitive, or straight into Save HTML.filename- the file's name, so downstream nodes can carry the original name along if they want it.
Install
Search ComfyUI_html in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/filipemeneses/ComfyUI_html
Then restart. No dependencies, no model files.
Where people get tripped up
The file list is built when the node is instantiated, which means a file you drop into input/ after the node already exists may not show up in the dropdown until you reload the workflow or recreate the node. And it's .html only - a .htm or .txt file won't appear even if it's valid markup. The most common actual mistake is forgetting which folder it reads: it's ComfyUI/input, not your project folder, so if you're editing a file elsewhere and wondering why nothing changes, you're editing the wrong copy.
It's a simple node - it reads a file and hands you a string - but it's the piece that turns a one-directional "LLM writes HTML" toy into a loop where a human's design and a model's edits can cooperate.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| html_file | COMBO | 0 options: |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |
| filename | STRING | — |