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

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

Frame math and audio slicing for a one-person talking head, in one node

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB-BOX - 🤖 数字人参数调节(单人)
    • Width
    • Height
    • Total Frames
    • FPS
    • FPS_Float
    • Audio
    aspect_ratioFree
    width480
    height832
    fps25
    fps_float25.00
    audio
    start_time0.00
    end_time10.00
    duration_display0 帧

    If you've ever built a talking-head or lip-sync workflow, you know the pain this node removes: the video side wants exact dimensions, an exact frame count, and an exact FPS, and the audio side wants a slice of a clip trimmed to match those frames - and they all have to agree to the last frame or the mouth drifts off the words. XB_DigitalHumanParams_Single is the pack's one-stop node for that coordination, aimed squarely at single-speaker digital human (数字人) pipelines.

    It's part of XB_ToolBox's digital-human family, and it's a fusion node: the resolution/framerate engine from the pack's VideoParamsMaster married to the audio-slicing logic from its AudioSlicer. One node, one set of controls, and everything it outputs is already aligned.

    How it works

    The node owns two jobs at once.

    Video params. You set aspect ratio, width, height, and fps (int + float version, since some pipelines want one or the other). Like the pack's other param masters, locked aspect ratios snap dimensions to valid multiples - 16px steps for standard ratios, 32px steps for the LTX variants, which have their own alignment rules. That's the same "golden bucket" hygiene the video ecosystem pushes: never send a model a width it wasn't trained on.

    Audio slicing. The audio dropdown lists files in your ComfyUI input directory (wav, mp3, flac, ogg, m4a, and friends). Pick one, set start_time and end_time in seconds, and the node trims it. The clever part: it converts the slice duration into a frame count at your chosen fps, then snaps it to the 4N+1 rule - the hard requirement for InfiniteTalk-style pipelines. The audio is then length-matched to those frames (padded or trimmed to the sample), so the waveform you get out is physically as long as the video you'll generate.

    The outputs

    Six wires: Width, Height, Total Frames, FPS, FPS_Float, and Audio. Total Frames is the star - feed it to the video generator's frame count, feed Audio to the audio track, and they'll line up because both were computed from the same trim.

    Install and gotchas

    Standard XB_ToolBox install (Manager search XB_ToolBox, or git clone into custom_nodes, restart). It relies on the pack's audio-slicing internals, which use PyAV (av) for decoding - that's in requirements.txt, so install the pack's deps if loading errors.

    The gotchas are audio-side. If audio shows only none, the file isn't in your input folder (the node can't browse arbitrary paths). And if your end time exceeds the clip length, the node clamps it and pads the result - you'll hear silence where there was no audio, so check duration_display to see the computed frame count before you queue. Finally, the 4N+1 snap is aggressive: a 10.0s clip at 25fps becomes 249 frames rather than 250, which is correct for the pipeline but surprising the first time.

    CategoryXB_ToolBox/DigitalHuman

    Inputs (9)

    NameTypeDefaultDescription
    aspect_ratioCOMBOFree11 options: Free, 1:1, 16:9, 9:16, 4:3, 3:4, +5
    widthINT48064–8192
    heightINT83264–8192
    fpsINT251–120
    fps_floatFLOAT25.001–120
    audioCOMBO1 options: none
    start_timeFLOAT0.000–99999
    end_timeFLOAT10.000–99999
    duration_displaySTRING0 帧

    Outputs (6)

    NameTypeDescription
    WidthINT
    HeightINT
    Total FramesINT
    FPSINT
    FPS_FloatFLOAT
    AudioAUDIO