📜hua_gradio Resolution
The width/height control that keeps your packaged workflow from making tiny images
- width
- height
Hua_gradio_resolution (📜hua_gradio Resolution) is how a non-ComfyUI user picks the output size in your packaged workflow. Drop it in, and the pack's Gradio frontend shows a resolution preset dropdown plus width/height number fields; change them in the UI, and on the next run the frontend writes those numbers back into this node before the graph executes. Your sampler and latent setup read them downstream, and the person clicking buttons never has to know what a latent is.
Under the hood it's two ints in, two ints out - no resizing, no interpolation, just a width/height tuple the rest of the graph uses. That's the whole trick: it's a source of dimensions, not an operator on pixels.
Inputs:
custom_width- INT, 64 to 8192, step 64. Default 512.custom_height- INT, same range, default 512.name- label for the frontend.
Outputs are width and height (both INT). Typical wiring: feed them into an Empty Latent Image node (or into your sampler's latent-size path). If you're packaging a SD 1.5 workflow, leave the defaults near 512; for SDXL, expect the preset list to hand you 1024-class sizes - the pack ships a sdxl_1_5_resolution.txt and flux_resolution.txt of presets it loads into that dropdown.
Install: ComfyUI Manager → "ComfyUI_to_webui", or
cd ComfyUI/custom_nodes
git clone https://github.com/kungful/ComfyUI_to_webui.git
restart. No models to download; the Gradio app comes up at http://127.0.0.1:7861 after the workflow has been run once so the API JSON is auto-saved.
The one thing that bites people: this node does not clamp or enforce anything downstream - it just passes through what the UI gives it. Feed it a value that isn't a multiple of 8 and the latent will complain at VAE-decode time, not here. Keep the step at 64 and you're fine. Also note that, like the rest of the pack's "hua_gradio" nodes, its meaning is entirely in the frontend plumbing: if you're not using the Gradio UI, a stock Primitive node set to INT does the same job with less ceremony. When you are packaging, though, it's the difference between your client emailing you "how do I change the size?" and just changing the size.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| custom_width | INT | 51264–8192 | — |
| custom_height | INT | 51264–8192 | — |
| name | STRING | Hua_gradio_resolution | 节点名称 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |