ComfyUI Node

PS Slider

One float, snapped to a grid you can actually trust

By AIGCTV·Created 2 months ago·Updated a day ago· 2
PS Slider
    • value
    value1.00
    min0.00
    max1.00
    step0.01
    param_idstrength
    labelStrength
    source_json{"kind":"canonical","key":"strength"}

    Denoise, strength, CFG, a scale factor - every workflow has two or three floats that you nudge a hundred times. PS Slider is a single value node for one of them, with a range and a step, so the same number can be dialled from the ComfyUI canvas or from a Photoshop panel.

    It comes from ComfyUI PS Bridge Nodes, the ComfyUI half of Vplugins. You can use it standalone as a fancier primitive; it earns its keep when Vplugins writes into it at run time.

    How it works

    It's a value node, in the same family as ComfyUI's own primitives: break a widget out of the node that consumes it, give it one authoritative source, and stop typing the same number twice. The pack's twist is what's around the value - min, max and step are ordinary inputs on the node, and the pair (param_id, source_json) is the binding that tells Vplugins "this is the strength parameter."

    The part worth understanding is the grid. The value isn't a free float: it's snapped to min + n × step, rounded half-up, using Decimal math with about 80 digits of precision, and the frontend mirrors exactly the same tick calculation in JavaScript. That's fussy-sounding and it's actually a feature - it means the number the Photoshop panel shows you is bit-for-bit the number ComfyUI uses, with no 0.30000000000000004 embarrassment in the middle. Cost of the same mechanism: get your step wrong and the top of your range becomes unreachable. With min 0, max 1, step 0.3, the grid is 0.0/0.3/0.6/0.9 - 1.0 isn't a tick, so it can't be selected. Keep the step a clean divisor of the range (0.01, 0.05, 0.1) and it never comes up.

    Inputs and outputs

    • value - the current value, default 1.
    • min (0) and max (1) - the declared range. min must be lower than max.
    • step (0.01) - bigger than zero.
    • param_id (strength), label (Strength), source_json - advanced binding fields; source_json defaults to {"kind":"canonical","key":"strength"}. Leave them unless you're building the matching workflow definition.

    Output: value (FLOAT). Wire it into a converted widget - denoise on a KSampler, strength on an image-scale node, CFG - or any node that accepts FLOAT.

    Two structural rules: the fields have no input sockets (this is a literal value, one source by design), and there's one PS Slider per workflow. If you need two dials, you need a different node for the second one.

    Validation happens before the queue: min ≥ max, a non-positive step, a value outside the range, or a step grid that overshoots the range are all rejected up front and reported on the node instead of blowing up mid-run. That's more than most value nodes bother with, and it's why the panel can trust the binding.

    In the bundled PS_Bridge_Roundtrip.json example the slider feeds an image scale node - which is why the README tells you to leave it at 1 for your first test, so RGB and ALPHA stay the same size and you don't trip the alpha-mismatch check on Send to PS.

    Install

    Search ComfyUI PS Bridge Nodes in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AIGCTV/comfyui-ps-bridge-nodes.git
    cd comfyui-ps-bridge-nodes
    python -m pip install -r requirements.txt
    

    Restart, then Ctrl+F5 the browser. Deps are just rfc8785 and jsonschema; no models. Needs a V3-API ComfyUI, classic canvas recommended. Nodes are under Add Node → 🔷PS Vplugins.

    Troubleshooting

    The value you set isn't the value that ran. Check your step: a value off the grid snaps to the nearest tick. That's the whole 0.5-in, 0.6-out story.

    "Slider minimum must be less than maximum" / "Nearest step falls outside the declared range." The first is self-explanatory; the second means your step doesn't divide the range evenly, so the nearest tick lands past max. Fix the step, not the value.

    You changed the range and the Photoshop side stopped matching. If the workflow is bound, re-bind it or toggle Test Mode off and back on - the panel caches the parameter set it was handed. Switching the graph structure or restarting either end has the same effect on the connection.

    Category🔷PS Vplugins

    Inputs (7)

    NameTypeDefaultDescription
    valueFLOAT1.00-9007199254740991–9007199254740991
    minFLOAT0.00-9007199254740991–9007199254740991
    maxFLOAT1.00-9007199254740991–9007199254740991
    stepFLOAT0.01-9007199254740991–9007199254740991
    param_idSTRINGstrength
    labelSTRINGStrength
    source_jsonSTRING{"kind":"canonical","key":"strength"}

    Outputs (1)

    NameTypeDescription
    valueFLOAT