Nodes/ComfyUI_to_webui/🌙Image Output to Gradio Frontend
ComfyUI Node

🌙Image Output to Gradio Frontend

The node that hands your finished images to the webui

By kungful·Created 2 years ago·Updated 8 months ago· 25
🌙Image Output to Gradio Frontend
  • images
    unique_iddefault_id
    nameHua_Output

    Hua_Output (🌙Image Output to Gradio Frontend) is the finishing node of the ComfyUI_to_webui pack: wire it after your VAE decode and it both saves your image and tells the Gradio frontend where it is, so the result shows up in the webui's gallery. If you're packaging a workflow, this is your Save Image replacement - it does the same job, plus the part that makes the frontend work.

    The mechanism is a little handshake. When the node runs, it saves each input frame as a timestamped PNG into ComfyUI's output folder (output_YYYYMMDD_HHMMSS_00000.png style), then writes the list of absolute paths into a temp file named after a unique_id. The Gradio app polls for exactly that file: it reads the paths, verifies they exist, and displays them. The unique_id is how the frontend knows which run's output to show - leave its default alone; when you run from the webui, the frontend overwrites it with a fresh execution ID each time.

    Inputs, all three required:

    • images - the IMAGE tensor(s) to save. Plug VAE decode output here.
    • unique_id - default "default_id"; the frontend swaps in its own ID per run.
    • name - node label.

    No outputs (it's an output node in the ComfyUI sense). It also doesn't return the standard "saved files" UI result the way stock Save Image does, so in the plain ComfyUI UI you'll see the files on disk rather than a preview card - the gallery lives in the Gradio front, not in ComfyUI's canvas.

    Install: ComfyUI Manager → "ComfyUI_to_webui", or

    cd ComfyUI/custom_nodes
    git clone https://github.com/kungful/ComfyUI_to_webui.git
    

    then restart. No models to grab. Run the workflow once in ComfyUI so the pack auto-saves the API JSON - without that, the frontend has no workflow to show, and this node has no frontend to talk to.

    Where people get burned: the temp JSON handshake is the fragile bit. If ComfyUI and the Gradio app disagree about where the temp directory is (the code uses ComfyUI's temp dir), the frontend waits, times out, and reports nothing. It's usually a path/config issue, not a generation failure - check the logs the pack prints for the temp path. Also, the video sibling Hua_Video_Output handles the same handshake for mp4/gif output, so if you're packaging a video workflow, that's the node you want at the end instead. For stills, this is the one.

    Category❤️ 靓仔 ✨

    Inputs (3)

    NameTypeDefaultDescription
    imagesIMAGEThe images to save.
    unique_idSTRINGdefault_idUnique ID for this execution provided by Gradio.
    nameSTRINGHua_Output节点名称

    Outputs (0)

    No outputs