Nodes/ComfyUI Web Viewer/FLOAT Remap @ vrch.ai
ComfyUI Node

FLOAT Remap @ vrch.ai

Stretch any control value into any range — pure math, no servers

By VrchStudio·Created 2 years ago·Updated 18 days ago· 356
FLOAT Remap @ vrch.ai
    • OUTPUT
    input_min0.00
    input_max1.00
    output_min0.00
    output_max100.00
    output_invertfalse
    output_default0.00
    input

    Every controller in the ComfyUI Web Viewer pack hands you a number in a range you probably don't want. Your gamepad stick is 0–1, your OSC fader is whatever your phone app sends, your key scrubber sits in 0–1 - and meanwhile your KSampler wants a denoise in 0–1 and your CFG wants 3–9. The FLOAT Remap node is the adapter that makes those two numbers talk. It's a pure linear remap, no network, no state, nothing clever, and you'll find yourself slapping it between a controller and a parameter constantly.

    What it is

    The math is the whole node. Feed a FLOAT into the optional input, and it maps input_mininput_max onto output_minoutput_max. A 0.0–1.0 fader becomes 3.0–9.0 for your CFG; a 0–1 stick becomes a 0–100 blend. output_invert flips the direction (fader up means value down), which is handy when your controller's "up" doesn't match your parameter's "more." output_default is what comes out when there's no input connected - so you can pre-set a sane value and let the node sit there until you plug something in. The single output is OUTPUT, the remapped float.

    Common issues

    A couple of practical details. The optional input is what makes this flexible: leave it unplugged and the node just holds output_default, plug a controller into it and it tracks live. The ranges default to 0→1 in, 0→100 out, which is a fine starting point but almost never what you actually want - set both pairs explicitly, because the default output range of 0–100 will bite you if you feed the result into something expecting 0–1. And because the mapping is linear, it's the right tool for "squash this range into that range" but the wrong tool for curves - if you want an eased, nonlinear response you'll need to do that shaping elsewhere.

    How to install

    Install is the usual pack story: search "ComfyUI Web Viewer" in ComfyUI Manager, or

    cd ComfyUI/custom_nodes
    git clone https://github.com/VrchStudio/comfyui-web-viewer
    cd comfyui-web-viewer
    pip install -r requirements.txt
    

    then restart. Windows portable users run the pip line with python_embeded\python.exe. No models, no dependencies worth mentioning - this node is a few arithmetic operations.

    Honest take: this isn't a headline feature, it's plumbing. But it's the plumbing that makes the fun nodes usable, because controllers almost never output the range your sampler wants. Grab a FLOAT Key Control or FLOAT OSC Control node, run its output through this remap, and you've got a live knob on any parameter in the graph without touching the node's own inputs. That's the pattern - and it's why this tiny utility earns a permanent spot in any interactive workflow.

    Categoryvrch.ai/logic

    Inputs (7)

    NameTypeDefaultDescription
    input_minFLOAT0.00-999999–999999
    input_maxFLOAT1.00-999999–999999
    output_minFLOAT0.00-999999–999999
    output_maxFLOAT100.00-999999–999999
    output_invertBOOLEANfalse
    output_defaultFLOAT0.00
    inputoptFLOAT

    Outputs (1)

    NameTypeDescription
    OUTPUTFLOAT