Nodes/ComfyUI Web Viewer/IMAGE Filter Settings @ vrch.ai
ComfyUI Node

IMAGE Filter Settings @ vrch.ai

Apply CSS-style filters to a WebSocket display without re-rendering

By VrchStudio·Created 2 years ago·Updated 18 days ago· 356
IMAGE Filter Settings @ vrch.ai
    • IMAGE_FILTERS_JSON
    opacity1.00
    brightness1.00
    contrast1.00
    saturate1.00
    hue_rotate0
    invert0.00
    sepia0.00
    blur0
    incremental_updatefalse
    debugfalse

    Want your live WebSocket display to look like it's under a club light, running through sepia, or slightly out of focus? Normally you'd bake that into the image with more sampling, which costs GPU time and locks you into a look. The IMAGE Filter Settings node does the same thing for free and instantly: it emits a JSON description of CSS-style filters that the WebSocket viewer applies in the browser, live, without touching the underlying image.

    What it is

    The output is a single IMAGE_FILTERS_JSON - that's the whole deliverable - and every input is a CSS filter parameter, so if you've ever styled a web page you already know these: opacity, brightness, contrast, saturate, hue_rotate (0–360 degrees), invert, sepia, and blur (0–50 pixels). The defaults are the neutral values - opacity 1, brightness 1, contrast 1, saturate 1, everything else 0 - so the node does nothing until you push a slider. Each one clamps to a sensible range, and debug prints the generated JSON when you want to see what you're sending.

    Where it plugs in: the IMAGE WebSocket Settings node has an optional image_filters_json input, and that's exactly where this JSON goes. Feed it in and the WebSocket viewer applies the filters client-side on top of whatever it's displaying. The beauty is that you can change the look mid-performance by feeding the filter values from a controller - an OSC fader into a FLOAT remap, say - and the display responds instantly. That's the realtime ethos of this pack in miniature: the GPU renders the image once, and the presentation layer does the rest for free.

    There's also an incremental_update toggle on this node. When on, it only sends the filters that changed rather than the whole JSON blob on every update - the kind of optimization that matters when you're driving filters from a live control signal on a slower network. Default off, but worth enabling once you're automating it.

    How to install

    Install is the pack-standard path:

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

    restart ComfyUI. Manager users search "ComfyUI Web Viewer". Windows portable: python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\comfyui-web-viewer\requirements.txt. No models involved.

    Common issues

    Honest take: for a single static look, you could argue this is over-engineering - pick the filters in your image pipeline and be done. But the moment you want to change the look live, or layer a sepia wash over output you're also saving as pristine frames, this node is the right tool. Because the filter is applied in the browser and never baked into the image, your saved frames stay clean while the audience sees the moody version. That split - perform the look, keep the source pure - is exactly why this node earns its place in the WebSocket branch of the pack.

    Categoryvrch.ai/viewer/websocket

    Inputs (10)

    NameTypeDefaultDescription
    opacityFLOAT1.000–1
    brightnessFLOAT1.000–2
    contrastFLOAT1.000–2
    saturateFLOAT1.000–2
    hue_rotateINT00–360
    invertFLOAT0.000–1
    sepiaFLOAT0.000–1
    blurINT00–50
    incremental_updateBOOLEANfalse
    debugBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    IMAGE_FILTERS_JSONJSON