Nodes/Stable Audio 3 Editing/Stable Audio 3 Inpaint Region
ComfyUI Node

Stable Audio 3 Inpaint Region

Pick the seconds of audio you want Stable Audio 3 to rewrite

By pavel-zinchenko·Created 21 days ago·Updated 21 days ago· 1
Stable Audio 3 Inpaint Region
    • region
    start_seconds4.00
    end_seconds8.00

    This is the smallest node in the pack, and it does exactly one thing: it picks a slice of time on a track that you want Stable Audio 3 to regenerate. Two numbers in, one region out. It never touches audio itself, never touches a model - it's pure selection, and that's the point. Everything heavy lives in its big sibling, StableAudio3InpaintConditioning; this node is just the clean way to express where.

    You don't use it alone. It exists to feed the region sockets on the inpaint conditioning node, so the mental model is: one or more StableAudio3InpaintRegion boxes each mark a section to rewrite (say, 15–45 seconds where a wrong note sits), and the conditioning node figures out the rest. The name is a lie in the friendliest way - you can use the exact same "region" mechanic to extend audio past its end, which is what makes the pack do outpaint and continuation too. More on that below.

    The two inputs

    • start_seconds (default 4, range 0–384): where the rewrite begins.
    • end_seconds (default 8, range 0–384): where it ends.

    That's the entire input list. Both are plain floats in seconds of the source audio's timeline - no bars, no beats, just time. Set a start earlier than the end and hit run; the node validates that end > start and gives you a readable error if you flip them.

    The single output, region, is a custom type you'll only ever connect to the regions socket on StableAudio3InpaintConditioning (which accepts up to 16 of them - drag additional sockets out of its autogrow input). Under the hood it's just a (start, end) pair, but you never see that.

    One subtlety: granularity and continuation

    That floating-point precision is a little fib. Stable Audio 3's VAE compresses time 4096x at 44.1 kHz, so the underlying latent has a step roughly every 0.09 seconds - a region narrower than that errors out as "shorter than one latent time step." You can't cut a 30-millisecond transient; don't try. For ordinary section replacement, round to the tenth of a second and move on.

    The genuinely useful trick is continuation. To extend a 60-second track to 90 seconds, create a region from start_seconds = 60 to end_seconds = 90 - beyond the end of the source. The conditioning node sees the region end past the audio's length, extends the timeline to match, and regenerates the new material as a natural continuation. Same region node, completely different job. That's why it's worth having even though it does so little by itself.

    Installing

    Install once for the whole pack - it ships with the other two nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/pavel-zinchenko/comfyui-stable-audio-3-edit
    

    Restart ComfyUI, or use Manager and search "stable audio 3 edit." No Python dependencies, but you need ComfyUI 0.33.0+ (it uses the new native node API) and the SA3 model files in models/checkpoints and models/text_encoders - the region node itself won't complain about a missing model, but the moment you connect it to the conditioning node you'll find out.

    Categorymodel/conditioning/stable audio 3

    Inputs (2)

    NameTypeDefaultDescription
    start_secondsFLOAT4.000–384
    end_secondsFLOAT8.000–384

    Outputs (1)

    NameTypeDescription
    regionSA3_INPAINT_REGION