Nodes/DeepFuze/DeepFuze Padding Preview
ComfyUI Node

DeepFuze Padding Preview

See your face-mask padding before you burn a full video pass on it

By SamKhoze·Created 2 years ago·Updated about a year ago· 461
DeepFuze Padding Preview
  • images
    face_mask_padding_left0
    face_mask_padding_right0
    face_mask_padding_bottom0
    face_mask_padding_top0

    Both the DeepFuze Lipsync and FaceSwap nodes take four face_mask_padding_* inputs (left, right, bottom, top, each 0–30). Padding expands the mask around the face before the swap or lipsync runs, which matters a lot: too little and the mouth region or jawline gets a hard mask edge, too much and the box swallows background. But you don't want to guess-and-check those four numbers on a full video render. This node is the check - a single-frame preview that draws the exact mask box with your padding values so you can dial them in before committing. It's a debug utility, not a creative node, and it never appears in a finished workflow.

    How it works

    The node takes an image and runs the pack's FaceFusion-based face_debugger frame processor via run.py with your four padding values and --face-mask-types box. The debugger detects the face, draws the bounding box, and applies the padding, and the result is shown in the UI. It uses the same face-detection pipeline (InsightFace-style detectors via ONNX) that the real Lipsync and FaceSwap nodes use, so what you see is what those nodes will use. It's an output node with no connections coming out - it exists to show you something.

    Inputs

    • images (required) - an IMAGE tensor. A single representative frame from your video is the smart thing to feed it; the node processes whatever batch you give it, but a frame is enough to judge padding.
    • face_mask_padding_left / right / bottom / top - each an INT, 0–30, default 0. These mirror exactly the padding inputs on the Lipsync and FaceSwap nodes, so once the preview looks right, copy the numbers over.

    There are no outputs - this node is a dead end by design.

    Install

    Part of the DeepFuze pack, so the standard pack install applies:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SamKhoze/ComfyUI-DeepFuze
    

    then pip install -r requirements.txt, restart ComfyUI. (Windows: ComfyUI Manager → search "DeepFuze".) Windows also wants Visual Studio C++ Build Tools, and GPU acceleration is optional - the README's strong advice is that CUDA 11.8 setup isn't beginner-friendly and CPU is fine.

    Gotchas

    The one real failure mode: the node shells out to run.py, which needs the face-detection models present in ComfyUI/models/deepfuze/ (downloaded from the pack's Google Drive, one file at a time). No models, no preview. Second, the whole pack is unmaintained and the README warns it's not compatible with the latest ComfyUI - expect this to be the kind of node that survives on whatever ComfyUI version you installed it on. Worth the setup anyway: it turns "guess the padding" into a two-second visual check.

    CategoryDeepFuze

    Inputs (5)

    NameTypeDefaultDescription
    imagesIMAGE
    face_mask_padding_leftINT00–30
    face_mask_padding_rightINT00–30
    face_mask_padding_bottomINT00–30
    face_mask_padding_topINT00–30

    Outputs (0)

    No outputs