Nodes/comfyui-rb-bridge/RB Int Bridge
ComfyUI Node

RB Int Bridge

Change the number mid-run, not after a restart

By itribs·Created 2 days ago·Updated a day ago· 0
RB Int Bridge
    • value
    value_edit0
    timeout-1
    value

    A lot of the numbers you tune in ComfyUI are guesses you only get to correct after you've seen some output. Steps, seed, width/height, batch count, frame count - you set them, click queue, and hope. See the intermediate result and you'd change the number before the slow part runs - but normally "change the number" means interrupt and lose the first stage's work.

    RB Int Bridge lets you edit an integer at a genuine stopping point. Execution reaches it, the run parks, a number box opens on the node. Type the new value, hit Continue, and everything downstream runs with it. Everything upstream keeps its already-computed result - no re-run, no waste.

    It's one of the pause-and-edit family from itribs/comfyui-rb-bridge, and it's the natural pick when the decision you're making mid-run is a whole number. CFG and denoise are floats (reach for RB Float Bridge there); but steps, seeds, resolution, frame counts - those are this node's territory.

    The inputs that matter

    • value_edit (INT, default 0) - the box you edit while paused. If nothing is wired in, whatever's here is what comes out.
    • value (INT, optional) - connect an upstream integer and it becomes the starting point, loaded into the box when the pause fires so you can override it. Unconnected means the widget value rules.
    • timeout (FLOAT) - pack-wide: -1 waits for you (default), 0 skips the pause and passes through instantly, >0 auto-continues after N seconds.

    Output is one value (INT), ready to plug into any integer input downstream - a KSampler's steps, an image node's dimensions, a batch counter.

    There's a neat trick hidden in that timeout setting. Set it to 0 with no wire connected and the node stops pausing entirely - it just passes value_edit straight through. In other words it doubles as a plain typed integer source, the same job ComfyUI's own PrimitiveInt node does. One node that's a static number source by default and an interactive decision point when you want it.

    How it works

    Standard for the pack: the node fires a session event to the frontend, Continue and Cancel light up, and a server-side wait loop blocks the run until you answer. Continue posts the box's current value back over an HTTP route and the node returns it; Cancel fires a full workflow interrupt. The loop polls for interrupts every tenth of a second, so the normal Stop button still works while you're parked.

    One caveat born of ComfyUI's caching: re-queue a workflow where nothing upstream changed and the node can be skipped entirely - no pause. These bridge nodes don't force a re-run the way RB Pause's force_pause flag does. Touch the value_edit widget or any upstream input and it'll stop again.

    A typical shape

    A workflow where the first sampler is fast and the second is slow, with steps wired through the bridge: first run parks after the cheap pass, you look at the result, decide the slow pass is worth 40 steps this time instead of 60, and Continue. The tail runs with your number; the cheap pass doesn't re-execute.

    Installation

    Dependency-free single repo, no models to download. ComfyUI Manager: search comfyui-rb-bridge. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/itribs/comfyui-rb-bridge
    

    Restart ComfyUI and hard-refresh the browser tab - the edit box and buttons are a frontend extension, and stale JS is the usual reason new nodes show up looking half-built. Find the node by searching "RB"; the pack's nodes sit in the bridge category.

    Common issues

    • It parks and never resumes at timeout -1. By design - click Continue. Stop also unblocks it if you want out.
    • Re-queue sails straight past. Caching skipped an unchanged node; change the widget or an upstream value to force it to pause again.
    • Cancel kills the whole run, not just the tail. Continue is the only "resume" button.
    • Buttons or widget rendering broken? The pack draws its own DOM widgets on the classic canvas; on the newer Nodes 2.0 rendering, custom widget nodes have been known to break (rgthree's included). Switch back to the classic canvas if you hit it.
    Categorybridge

    Inputs (3)

    NameTypeDefaultDescription
    value_editINT0
    timeoutFLOAT-1Seconds to wait. -1 = infinite, 0 = skip pause
    valueoptINT

    Outputs (1)

    NameTypeDescription
    valueINT