📁hua_gradio_json Save
The node that saves the workflow your Gradio frontend runs
- images
Hua_gradio_jsonsave (📁hua_gradio_json Save) is the pack's plumbing made visible. The whole ComfyUI_to_webui idea is "build your workflow in ComfyUI, then serve it as a webui" - and the bridge between those two worlds is an API-format JSON of the graph. This node writes that JSON to disk for you. The author describes it as saving "api格式json工作流" (API-format workflow JSON); the pack also auto-saves the JSON when you run a workflow that ends in the Gradio output node, so this node is the belt-and-suspenders version.
It's an output node with three required inputs: images (any IMAGE - it's mostly a dummy so the node runs after generation), filename_prefix (default "apijson", used to name the saved file), and name (a label). There are no outputs. When it executes it grabs the current prompt from the hidden inputs and dumps it as pretty-printed JSON into the pack's save folder. That's the file your Gradio frontend's "选择工作流" dropdown lists. Delete or rename it and the workflow disappears from the UI until you re-run.
Where does it land? The code resolves the output path through ComfyUI's save-image-path helper, which defaults to the output directory - same place the README says the auto-saved API workflows go (ComfyUI/output). If you're hunting for the JSON a frontend is showing, look there.
The images input is worth calling out because it's a trap for the tidy-minded: despite the name and the IMAGE input, this node does not save image files. It builds a result list of filenames for the UI but never writes the PNGs. The images input exists so the node has a reason to run after your VAE decode. Save your actual images with the 🌙Image Output node; use this one for the JSON.
Install is the pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/kungful/ComfyUI_to_webui.git
or ComfyUI Manager → "ComfyUI_to_webui", then restart. No model files. Then the usual sequence: build the graph, run it once, and the JSON this node (or the auto-save) produced appears in the frontend's workflow dropdown on http://127.0.0.1:7861.
Honest take: most people never need to place this node manually - the auto-save covers it. Add it when you want a named workflow file that survives re-runs, or when you're about to share a packaged setup and want the JSON to have a sensible filename instead of the auto-generated one.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The images to save. | |
| filename_prefix | STRING | apijson | 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. |
| name | STRING | Hua_gradio_jsonsave | 节点名称 |
Outputs (0)
No outputs