Nodes/ComfyUI Web Viewer/INT OSC Control @ vrch.ai
ComfyUI Node

INT OSC Control @ vrch.ai

A fader on your phone, driving any integer in your graph

By VrchStudio·Created 2 years ago·Updated 22 days ago· 356
INT OSC Control @ vrch.ai
    • VALUE
    • RAW_VALUE
    server_ip172.17.0.2
    port8000
    path/path
    input_min0.00
    input_max1.00
    output_min0
    output_max100
    output_invertfalse
    output_default0
    debugfalse

    INT OSC Control is how you get a physical fader's worth of feel into a ComfyUI integer. It listens for an OSC message on a given path, takes the value it gets, remaps it into an integer range you define, and hands it to the graph. Wire it to a TouchOSC fader on a tablet and you've got a live hand on CFG scale, steps, a seed counter, or anything else that takes an int. This is the node that moves ComfyUI from "type a number" to "ride a parameter."

    How it works

    OSC (Open Sound Control) is the protocol the pack's whole control layer leans on - same family as the phone-gyroscope-to-IC-Light experiments the community has been doing since 2024, but running locally and free. You point this node at the OSC receiver on your ComfyUI machine (server_ip and port, 8000 by default), tell it which address to listen on (path, default /path), and it does the rest.

    The mapping is the part to get right:

    • input_min / input_max - the range your OSC client sends. Defaults 0.0–1.0, which is what most faders send.
    • output_min / output_max - the integer range you want out. Default 0–100.
    • output_invert - flips the mapping, so a fader pushed up pushes your value down. The fix for "my controls feel backwards."
    • output_default - the fallback value used when no OSC message has arrived yet. This is important: until data flows, the node outputs this, not 0.

    The outputs are VALUE (the remapped integer, clamped to range) and RAW_VALUE (the raw float straight off the wire, handy for debugging or for a logic node that wants the unmolested input).

    Wiring it

    A typical chain: TouchOSC fader → INT OSC ControlINT Remap (if the destination range is awkward) → your sampler's steps, or a seed, or an image index in a flipbook viewer. Because the node clamps, you can also drive something safety-critical like a steps count without worrying about a fader yanking it to 999.

    The pack ships a ready-made TouchOSC panel (comfyui_osc_control.tosc) that maps straight onto the default paths and port - load it, point it at your machine, and the default /path message is already sane.

    Installing it

    Same pack, same install:

    1. ComfyUI Manager → search ComfyUI Web Viewer → install.
    2. Manual:
      cd ComfyUI/custom_nodes
      git clone https://github.com/VrchStudio/comfyui-web-viewer
      pip install -r requirements.txt
      
      Windows portable: python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\comfyui-web-viewer\requirements.txt.
    3. Restart ComfyUI.

    The python-osc dependency comes with the pack. First install is slow because requirements.txt also drags in the optional Music2Emotion stack (librosa, pytorch_lightning, numba) - nothing to do with this node, just let it finish.

    Where people get burned

    The default server_ip of 172.17.0.2 is a Docker-bridge leftover - on a normal desktop install it points at nothing. Set it to 127.0.0.1 or your machine's LAN IP or OSC messages will silently vanish. Second: if nothing arrives, check that your client is sending to the same port and path, and remember output_default is what you see before the first message - so a live-looking value on the node doesn't mean the wire is hot. Flip debug on and the console will tell you if messages are landing.

    Categoryvrch.ai/control/osc

    Inputs (10)

    NameTypeDefaultDescription
    server_ipSTRING172.17.0.2
    portINT80000–65535
    pathSTRING/path
    input_minFLOAT0.00-9999–9999
    input_maxFLOAT1.00-9999–9999
    output_minINT0-9999–9999
    output_maxINT100-9999–9999
    output_invertBOOLEANfalse
    output_defaultINT0-9999–9999
    debugBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    VALUEINT
    RAW_VALUEFLOAT