☀️Gradio Frontend Input Image
The upload box that lets your friends feed images into your ComfyUI workflow
- IMAGE
- MASK
This is the node that turns your graph into a thing a normal human can use. GradioInputImage (☀️Gradio Frontend Input Image) is the image-loading end of the ComfyUI_to_webui pack: put it in your workflow and the pack's Gradio frontend shows an "upload image" box. Someone who has never seen a node graph in their life can drop a photo in, hit the run button, and get an image back. No wires, no "which of these 14 nodes is the Load Image."
It's essentially a reskinned ComfyUI Load Image that the Gradio UI knows how to drive. The frontend takes the uploaded file, copies it into ComfyUI's input directory under a timestamped name, and this node picks it up from there. Under the hood it does the standard Load Image dance: EXIF orientation fix, convert to RGB, normalize to a 0–1 float tensor, and if the image has an alpha channel it extracts that as a mask (inverted, so opaque = 1). Wire the IMAGE output into your VAE encode or ControlNet preprocessor exactly like you would the stock node.
Two inputs, both worth knowing:
image- a dropdown of files in theinputdirectory. The frontend overwrites this with whatever you upload.name- a label for the node. The Gradio UI reads this to figure out which box is which. It defaults to "GradioInputImage"; change it if you're running more than one.
Outputs are IMAGE and MASK, same contract as stock Load Image. A handy detail: it's marked as an output node, which is how the pack knows a workflow wants an image input slot at all.
Install - via ComfyUI Manager (search "ComfyUI_to_webui"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/kungful/ComfyUI_to_webui.git
then restart ComfyUI. The pack auto-installs its deps (gradio, opencv, Pillow, numpy, httpx) on first import; on Windows embedded Python you may need ..\..\..\python_embeded\python.exe -m pip install -r requirements.txt. No model files to download. Once loaded, the Gradio app lives at http://127.0.0.1:7861 - that's where the upload box shows up.
The workflow has to be run once inside ComfyUI first, so the pack can auto-save an API-format JSON of it to output/; that JSON is what the Gradio frontend actually loads. And the README's one standing warning applies here too: include the 🧙hua_gradio Random Seed node, or ComfyUI may see the same JSON payload twice and refuse to re-run.
If you're building an img2img pipeline to hand to a client, this is the input you wire first. It's the difference between "send me the workflow" and "upload your photo here."
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png | |
| name | STRING | GradioInputImage | 节点名称 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | 这是一个gradio输入图片的节点 |
| MASK | MASK | — |