ComfyUI Node

Parameter

Parameter

By Acly·Created 3 years ago·Updated about a month ago· 667
Parameter
    • value
    nameParameter
    typeauto
    default
    min-10000000000.00
    max10000000000.00

    Parameter is how you expose a knob. Drop it into a workflow and you're declaring "this value should be settable from outside the graph" - by a tool, a script, or the Krita AI Diffusion plugin's UI - instead of hard-coded into some node's field. If you've ever built a custom workflow and wished a specific slider showed up in the driving application so a non-technical user could tweak it without opening the graph, that's the job. It turns an internal value into a named, typed input on the workflow's surface.

    This is the node that makes a ComfyUI graph feel like an app rather than a wiring diagram. The pack exists to let external tools use ComfyUI as a backend, and the natural tension there is that a graph is fixed once you build it - but the tool driving it wants to change things per run. Parameter resolves that: the workflow author decides which values are adjustable and gives each a name; the external tool reads those names and renders controls for them. Krita AI Diffusion uses this to surface custom-workflow parameters as UI in the plugin, so someone painting in Krita can adjust a value the graph author chose to expose, without ever seeing the node graph.

    The inputs define the control:

    • name (STRING, default "Parameter") - the label the parameter shows up under. This is the handle the external tool uses to find and set it, so make it distinct.
    • type (COMBO, default "auto") - what kind of value this is (number, text, and so on). auto lets it infer, but setting it explicitly makes the tool render the right kind of control.
    • default (STRING, default empty) - the value used when nothing overrides it, so the workflow still runs standalone.

    And two optional bounds:

    • min and max (FLOAT) - the allowed range when the parameter is numeric. They default to an enormous span (effectively unbounded), so set real limits if you want the UI to clamp input to something sensible.

    The single output is value (*) - a wildcard, because a parameter can be a number, a string, or whatever the type says. You wire it into whatever node field it's meant to feed: a step count, a denoise, a seed, a prompt fragment.

    Installation is the usual pack route: "ComfyUI Nodes for External Tooling" in ComfyUI Manager, or cd custom_nodes && git clone https://github.com/Acly/comfyui-tooling-nodes.git from your ComfyUI folder, then restart. No dependencies or downloads. And as with the rest of the krita category, the thing that reads these exposed parameters is the Krita AI Diffusion plugin, which installs and manages the pack itself - though Parameter is a little more general-purpose than its siblings, since any tool submitting workflows to ComfyUI can look for these and build controls from them.

    The main thing to get right is the type and the wildcard output. Because value is *, ComfyUI won't stop you wiring it into a field it doesn't fit - a text parameter into a numeric input, say - and you'll only find out at runtime. Set type deliberately and wire it to a matching field. Also mind the default: leave it empty on a parameter feeding a required numeric field and a standalone run (no external tool overriding it) can error, so give it a sane fallback. Used carefully, though, this is a genuinely tidy way to build a reusable workflow with a clean set of exposed dials - the difference between a graph only you can run and one you can hand to someone else.

    Categorykrita

    Inputs (5)

    NameTypeDefaultDescription
    nameSTRINGParameter
    typeCOMBOauto8 options: auto, number, number (integer), toggle, choice, text, +2
    defaultSTRING
    minoptFLOAT-10000000000.00
    maxoptFLOAT10000000000.00

    Outputs (1)

    NameTypeDescription
    value*