External Integer (ComfyDeploy)
Seeds, steps, and batch counts straight from an API call
- int
External Integer (ComfyDeploy) is the node that lets an outside app set a whole number in a deployed workflow. Seeds, step counts, batch sizes, a CFG that's rounded to an int - anything that takes an integer and should be changeable per API call. It's the int member of the ihmily/comfy-deploy "External" family, and apart from the type it's identical to its float and text siblings.
Like every node in this pack, it only becomes "external" once you deploy. The system is two pieces: these nodes inside ComfyUI, and a self-hosted admin backend (comfy-deploy-admin) that manages, debugs, and publishes deployed workflows. In the editor the node passes its default_value through, so you build and test with fixed numbers. After deployment, the request value keyed by your param_name replaces it at runtime.
How it works
The node source is a coercion with a fallback:
try:
return_value = int(float(default_value))
except ValueError:
return_value = 0
Note the int(float(...)) - it'll happily truncate 3.9 to 3. That's usually what you want for a steps or seed input, but it means the node is tolerant of sloppy callers. The deployment pipeline is what turns param_name into the request key: set it to "seed", and a caller posting {"seed": 123456789} changes the seed at runtime.
Inputs and outputs that matter
- param_name (required, default
"input_int") - the JSON key callers must send. This becomes your API contract, so pick it once and keep it stable across deployed versions. - default_value (optional, default
0, full signed 32-bit range) - the fallback when a call omits the parameter, and your local-testing value. For a seed input, the classic pattern is to leave this at a fixed number while testing, then let callers override it.
The output is int (INT), which wires into any integer input - KSampler's seed and steps, the batch count on an Empty Latent Image, whatever you need.
Installing it
Same as the rest of the pack - it ships together, so you get all five External nodes in one install:
cd ComfyUI/custom_nodes/
git clone https://github.com/ihmily/comfy-deploy.git
cd comfy-deploy
pip install -r requirements.txt
Or via ComfyUI Manager: search "comfy-deploy", pick the one by author ihmily, install, restart. No model files to fetch. One hard gate straight from the README: pack v1.0.1+ requires ComfyUI 0.3.67 or newer, so if the nodes never appear, update ComfyUI before you blame the pack. And the half people forget: you need comfy-deploy-admin running with its endpoint + API key set in the ComfyDeploy panel, or deployment isn't possible at all.
Gotchas
The fallback-to-0 behavior is the one to watch. If a caller sends a bad value, you silently get a seed of 0 - for a seed that's benign (same output every time, which might actually confuse your users), but for a steps parameter, zero steps produces garbage or a crash. Keep default_value sane and validate integers on the caller's side. Also remember the request key must exactly match param_name; a mismatch quietly uses the default and both you and your caller get to enjoy debugging that.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| param_name | STRING | input_int | — |
| default_valueopt | INT | 0-2147483648–2147483647 | — |
| display_nameopt | STRING | — | |
| descriptionopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| int | INT | — |