External Number Slider (ComfyUI Deploy)
The Float Slider That Becomes an API Argument
- value
If you've ever wanted someone else's web form to control your ComfyUI graph - a denoise slider on a page you don't own - this node is the contract that makes it possible. ComfyUIDeployExternalNumberSlider is a float input that the ComfyUI Deploy platform recognizes and exposes as an API parameter. When a request comes in with a value for your slider, the platform injects it; when you run the workflow locally, the node just quietly outputs its default.
How it works
Every external node in this pack carries an input_id - a plain string key that defaults to input_number_slider here. On a normal local run that key is literally the text "input_number_slider", so the node's run() does float(input_id), hits a ValueError, and falls back to default_value. That's why it behaves so unremarkably in your editor: it's a pass-through with a safety net.
Deployed through ComfyUI Deploy, the backend walks your workflow and swaps the real value from the request into that input_id slot. Now float(input_id) succeeds, and the node returns the caller's number - but only if it lands inside min_value to max_value. Out of range, and you get default_value back. So the range you set isn't decoration; it's a validation gate on the API.
The inputs that matter
input_id- the key a caller sends in the request body. Leave the default unless you're building a custom API and want a friendlier name.default_value(0.5) - what the node emits locally and whenever the range check fails. Set this to something that produces a sane preview, because it's also what you see when testing in the graph.min_value/max_value(0 / 1) - the slider bounds in the generated form and the accepted range on the API.display_name/description- what the ComfyUI Deploy dashboard shows as the label and help text for this field. Worth filling in if other people will consume the API.
The single output, value (FLOAT), wires straight into anything expecting a float - CFG scale, denoise, LoRA strength, ControlNet weight. For API-style inputs this is the one I'd reach for over the plain External Number sibling, because the range enforcement gives your callers instant feedback instead of silently passing garbage through.
Installing
ComfyUI Deploy installs like any custom node - ComfyUI Manager, search "ComfyUI Deploy", or:
cd ComfyUI/custom_nodes
git clone https://github.com/BennyKok/comfyui-deploy
Then restart ComfyUI. There are no model downloads. Its dependencies (aiofiles, pydantic, opencv-python, imageio-ffmpeg, brotli, tabulate) are plumbing, not heavyweights - nothing here needs a GPU of its own.
Gotchas
If a caller's value falls outside min/max, the node silently returns the default rather than erroring - fine for a form, confusing if you expected a hard reject. And remember the min/max widgets on the node are only advisory until a request actually arrives; locally, testing is always just "does the default look right."
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| input_id | STRING | input_number_slider | — |
| default_valueopt | FLOAT | 0.50-2147483647–2147483647 | — |
| min_valueopt | FLOAT | 0.00-2147483647–2147483647 | — |
| max_valueopt | FLOAT | 1.00-2147483647–2147483647 | — |
| display_nameopt | STRING | — | |
| descriptionopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | FLOAT | — |