Nodes/KIE.ai Nodes Next/Replace Music Section · V4.5ALL
ComfyUI Node

Replace Music Section · V4.5ALL

Pick a window, then dial the variety

By felipederosilva·Created 2 months ago·Updated 3 days ago· 3
Replace Music Section · V4.5ALL
    • audio
    • url
    • all_urls_json
    • task_id
    • raw_json
    • credits_consumed
    • credits_left
    ◄promptA calm and relaxing piano track.►
    ◄tagsJazz►
    ◄titleRelaxing Piano►
    ◄infill_start_s10.50►
    ◄infill_end_s20.75►
    ◄full_lyrics[Verse 1]\nOriginal lyrics content\n[Chorus]\nModified lyrics for this section\n[Verse 2]\nMore original lyrics►
    ◄task_id2fac****9f72►
    ◄audio_ide231****-****-****-****-****8cadc7dc►
    ◄negative_tagsRock►
    ◄lyrics[Chorus]\nModified lyrics for this section►
    ◄variety1►
    ◄vocal_genderm►
    ◄style_weight0.65►
    ◄weirdness_constraint0.65►
    ◄audio_weight0.65►
    ◄persona_idpersona_123►
    ◄persona_modelstyle_persona►
    ◄upload_urlhttps://example.com/audio.mp3►
    ◄timeout_seconds1200►
    ◄callback_url►

    The interesting control on this node isn't the one you'd expect. Everyone fiddles with the timestamps first; the number that actually decides whether your replacement belongs in the song is variety, a 0–4 dial that ranges from "same style, exactly" to "unreasonably varied" in the tooltip's own words. Get that right and the ten-second window rule becomes the only mechanical thing left.

    What it is

    KIE_Next_V4_5ALL_438fc3b1 regenerates a slice of an existing Suno track, pinned to the V4.5ALL provider version, via KIE.ai. One node per version is how the KIE Next pack works - the pack reads KIE's catalog and provider docs and generates a ComfyUI node for each operation/version combination, which is why the class name is a hash and why there are nine nodes in the Replace Music Section folder.

    Two honest notes about this specific variant. KIE describes V4_5ALL and V4_5 with identical words - smarter prompts, faster generation, up to 8 minutes of track - so the practical difference between this node and its V4.5 sibling is thin. And the whole V4 family is deprecated in KIE's model notes, superseded by V6, V6_MINI and V6_WILD. Keep this one for reproducing older work.

    How it works

    Section replacement is infill on the provider side: identify the source track, name a time window, describe what should now be there, and the model re-renders that stretch conditioned on the audio around it. You get a whole track back, not a stem or a diff.

    Under the hood it's the pack's standard generated-node pipeline - build the request, submit to KIE, poll until timeout_seconds (1200 default), download the first result URL into a ComfyUI AUDIO, then display the credit receipt. Your task_id comes out as a socket so you can chain runs.

    The inputs that matter

    Source first: task_id (parent task) and audio_id (the specific track in it). Both optional in the schema, both effectively required - the tooltips describe exactly those roles, and without them the provider doesn't know what it's replacing. Wire the generate node's task_id output, and pull the audio ID out of its raw_json.

    Then the window: infill_start_s and infill_end_s, seconds with two decimals, start < end, minimum ten seconds of width. That constraint is not negotiable and it's why "just redo this one phrase" doesn't work here.

    Then lyric bookkeeping: full_lyrics (required) is the whole song as it should read after the replacement; lyrics (optional) is just the replaced part. Required prompt, tags and title are description, style tags and name - and note that KIE's prompt tooltip says "the lyrics after replacement", which is a doc slip that has confused a lot of people into pasting verse text there.

    Now the knobs worth your attention. variety: 0 is "strictly the same style", 1 balanced, 2 clearly different, 3 bold exploration, 4 explicitly "may differ in style very significantly". For a section that must blend, stay at 0–1. For "give me an alternate bridge", 2–3. style_weight, weirdness_constraint and audio_weight are 0–1, all defaulting to 0.65, and my advice is to move one at a time - they interact and you'll never attribute the result otherwise. negative_tags defaults to Rock, which does have an effect. vocal_gender nudges, doesn't guarantee. persona_id/persona_model do nothing on a V4-family pin.

    Outputs

    audio → Save Audio / Preview Audio, or KIE • Assemble Video + Music for the video-scoring case. task_id seeds a follow-up replacement. url is remote and temporary, all_urls_json lists everything, raw_json is the provider's own answer, credits_consumed and credits_left are the receipt. And remember it's not an output node - no downstream consumer, no execution.

    Installing it

    cd ComfyUI/custom_nodes
    git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
    pip install -r requirements.txt
    

    ComfyUI Manager search "KIE.ai Nodes Next" and the Registry package kie-ai-nodes-next work too. Restart, then Settings → KIE.ai Nodes Next → Connection to paste your key; it's checked against KIE before replacing a saved one and only a masked fingerprint is ever shown. Env vars are unsupported on purpose. Deps: requests, Pillow, numpy, PyYAML. No weights, no VRAM.

    Where people get burned

    Sending a full_lyrics sheet that only contains the new section - the model then treats that as the entire song.

    Setting variety to 4 on a section that has to sit between two you like, and being surprised when the bridge arrives from a different album.

    And the cost model: every replacement is a paid render, good or bad. Right-click → KIE Next · Check inputs & model controls inspects the cached documented limits without uploading or submitting, which is the free way to sanity-check a window before you spend.

    CategoryKIE Next/Audio/Suno/Music Generation

    Inputs (20)

    NameTypeDefaultDescription
    promptSTRINGA calm and relaxing piano track.The lyrics after replacement. Required.
    tagsSTRINGJazzStyle tags for the music, such as jazz or electronic. Required.
    titleSTRINGRelaxing PianoThe title of the music. Required.
    infill_start_sFLOAT10.500–10000The point in time, in seconds, at which replacement starts, rounded to 2 decimal places. Required. Must be less than infill_end_s, and the difference between infill_end_s and infill_start_s must be at least 10 seconds.
    infill_end_sFLOAT20.750–10000The point in time, in seconds, at which replacement ends, rounded to 2 decimal places. Required. Must be greater than infill_start_s, and the difference between infill_end_s and infill_start_s must be at least 10 seconds.
    full_lyricsSTRING[Verse 1]\nOriginal lyrics content\n[Chorus]\nModified lyrics for this section\n[Verse 2]\nMore original lyricsThe complete modified lyrics, combining the modified and unmodified lyrics. Required. This parameter contains the complete lyrics text that will be used for the entire song after section replacement.
    task_idoptSTRING2fac****9f72The original task ID (parent task), used to identify the source music for section replacement.
    audio_idoptSTRINGe231****-****-****-****-****8cadc7dcThe unique identifier of the audio track to be replaced. This ID is returned in the callback data after music generation is completed.
    negative_tagsoptSTRINGRockMusic styles to exclude, used to prevent specific stylistic elements from appearing in the replacement section.
    lyricsoptSTRING[Chorus]\nModified lyrics for this sectionLyrics for the replaced segment. Optional. - V6, V6_MINI, and V6_WILD: Maximum 5000 characters.
    varietyoptINT10–4Controls the diversity and stylistic variation of generated results. Optional. Integer range 0–4, default 1. - **`0`**: off (exact style) — fully off, strictly the same style - **`1`**: normal (balanced variety) — default, balances stability and diversity - **`2`**: high (distinct styles) — produces results with clearly different styles - **`3`**: extra (bold exploration) — higher variation, encourages bold exploration of different styles - **`4`**: max (unreasonably varied) — maximum diversity; results may differ in style very significantly
    vocal_genderoptCOMBOmVocal gender preference. Optional. 'm' for male, 'f' for female. Based on practice, this parameter can only increase the probability but cannot guarantee adherence to male/female voice instructions.
    style_weightoptFLOAT0.650–1Adherence strength to specified style. Optional. Range 0–1, up to 2 decimal places.
    weirdness_constraintoptFLOAT0.650–1Controls experimental/creative deviation level. Optional. Range 0–1, up to 2 decimal places.
    audio_weightoptFLOAT0.650–1Relative weight of audio elements. Optional. Range 0–1, up to 2 decimal places.
    persona_idoptSTRINGpersona_123Persona ID or Voice ID to apply to the generated music. Optional. Use this to apply a specific persona style to your music generation. To generate a Persona ID, use the [Generate Persona](https://docs.kie.ai/suno-api/generate-persona) endpoint to create a personalized music Persona based on generated music. To generate a Voice ID, use the [Generate Voice](https://docs.kie.ai/suno-api/suno-voice-generate) endpoint.
    persona_modeloptCOMBOstyle_personaPersona model. Optional. Use `style_persona` for Generate Persona IDs, or `voice_persona` for Suno Voice IDs. Default: `style_persona`. Available for V5 (Discontinued), V5_5 (Discontinued), V6, V6_MINI, and V6_WILD.
    upload_urloptSTRINGhttps://example.com/audio.mp3The URL of the custom audio uploaded by the user.
    timeout_secondsoptINT120030–7200—
    callback_urloptSTRINGOptional KIE callback URL. Leave empty for normal ComfyUI use.

    Outputs (7)

    NameTypeDescription
    audioAUDIO—
    urlSTRING—
    all_urls_jsonSTRING—
    task_idSTRING—
    raw_jsonSTRING—
    credits_consumedFLOAT—
    credits_leftFLOAT—