Nodes/XB_ToolBox/XB-BOX - 🤖 数字人参数调节(双人)
ComfyUI Node

XB-BOX - 🤖 数字人参数调节(双人)

Two voices, two audio tracks, one synchronized frame count

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB-BOX - 🤖 数字人参数调节(双人)
    • Width
    • Height
    • Total Frames
    • FPS
    • FPS_Float
    • Audio1
    • Audio2
    • Combined Audio
    aspect_ratioFree
    width480
    height832
    fps24
    fps_float24.00
    audio1
    start10.00
    end110.00
    mute_count10
    mutes1_data
    audio2
    start20.00
    end210.00
    mute_count20
    mutes2_data
    merge_mode接力
    total_display0 / 0帧

    The two-person version of the pack's digital-human param node, and the one that exists because "two talking heads" is a different beast than "one." You've got two audio tracks, two speakers, and one video that has to contain both - which means the total frame count has to fit both voice tracks, however they're arranged. This node does the arrangement and hands you the synchronized result.

    It's aimed at the two-speaker digital-human pipelines (the Wan/InfiniteTalk-style dual-dialogue setups that the XB_ToolBox ecosystem builds for). If you're producing interview-style or dialogue content where both participants are on screen, this is the parameter-and-audio hub you want feeding the video generator.

    How it works

    The video side is the same engine as the single version: aspect ratio (with LTX variants snapping on 32px steps), width/height, fps int + float, and output dims that can't be invalid.

    The audio side is where it earns its keep. Two tracks, each with its own file, start_time/end_time trim, and a mute-silencing feature (mute_count + mutes data, which zeroes out listed time ranges - handy for removing coughs or dead air before the frame math runs). Each track is trimmed, frame-snapped to 4N+1, and length-matched to the video frames exactly like the single version.

    Then the merge mode decides how the two tracks coexist:

    • 接力 (relay) - the default. Track 2 plays after track 1 ends. Think back-and-forth dialogue: person A finishes, person B starts. Total frames = both durations added, then snapped.
    • 重叠 (overlap) - both tracks play at once, mixed. For crosstalk, two people talking over each other, or a presenter with music bed. The mix runs through a hard limiter (values clamped to [-1, 1]) so overlapping speech doesn't clip, and total frames is the longer of the two.

    The outputs

    Eight wires: Width, Height, Total Frames, FPS, FPS_Float, then Audio1, Audio2, and the big one - Combined Audio. Wire Audio1/Audio2 to their respective lip-sync channels if the pipeline handles each speaker separately, or feed Combined Audio to the merged video if it takes one track.

    Install and gotchas

    Standard XB_ToolBox install, and like the single version it needs the pack's audio deps (av from requirements.txt) for decoding. Both audio files come from your ComfyUI input folder via the dropdowns.

    The gotchas are timing. If the two clips have different sample rates, the node resamples to the first track's rate - fine, but check if you hear a pitch or quality shift in one track. In relay mode the total frame count is a straight sum of the two snapped durations, so trimming either track by a second changes the final video length by that second - adjust video length expectations accordingly, or the tail of the generated video can come out empty. And the mute ranges are absolute times within each original file, not relative to the trim start - a common off-by-N-seconds confusion when you set them from memory instead of a waveform view.

    CategoryXB_ToolBox/DigitalHuman

    Inputs (17)

    NameTypeDefaultDescription
    aspect_ratioCOMBOFree11 options: Free, 1:1, 16:9, 9:16, 4:3, 3:4, +5
    widthINT48064–8192
    heightINT83264–8192
    fpsINT241–120
    fps_floatFLOAT24.001–120
    audio1COMBO1 options: none
    start1FLOAT0.000–3600
    end1FLOAT10.000–3600
    mute_count1INT00–20
    mutes1_dataSTRING
    audio2COMBO1 options: none
    start2FLOAT0.000–3600
    end2FLOAT10.000–3600
    mute_count2INT00–20
    mutes2_dataSTRING
    merge_modeCOMBO接力2 options: 接力, 重叠
    total_displaySTRING0 / 0帧

    Outputs (8)

    NameTypeDescription
    WidthINT
    HeightINT
    Total FramesINT
    FPSINT
    FPS_FloatFLOAT
    Audio1AUDIO
    Audio2AUDIO
    Combined AudioAUDIO