Nodes/ComfyUI-PromptMaker-PNGTuber/PNGTuber Video Mouth Builder
ComfyUI Node

PNGTuber Video Mouth Builder

Same extraction as the upload node, but with every knob exposed

By hobi2k·Created 3 months ago·Updated 3 months ago· 0
PNGTuber Video Mouth Builder
    • mouthless_video
    • mouth_track_json
    • mouth_sprite_atlas_json
    • bundle_manifest_json
    • mouth_closed
    • mouth_half
    • mouth_open
    • mouth_e
    • mouth_u
    • summary_json
    video_pathinput_video.mp4
    output_dir
    asset_idpngtuber_video_mouth
    max_frames0
    frame_stride1
    detection_confidence0.50
    detection_modeanime_first
    face_yolo_fallbacktrue
    track_quad_scale1.25
    inpaint_scale1.55
    inpaint_radius5
    erase_methodeigen
    sprite_size512
    preserve_audiotrue
    angle_range_degrees45
    angle_step_degrees15
    occlusion_filtertrue

    This is the node behind PNGTuber Video Upload to Mouth Bundle - literally. PNGTuberVideoUploadToMouthBundle subclasses this class and calls its pipeline with a fixed set of sensible defaults. Reach for this one when you want the tuning knobs instead: the raw video_path input, the detection strategy, the inpainting geometry, and - the reason it's worth knowing about even if you never touch a slider - the erase_method switch.

    The knob that matters most: erase_method

    The upload node is hardwired to eigen, which means it needs the local Qwen image-edit stack (model, text encoder, VAE, TextEncodeQwenImageEditPlus) just to erase mouths, and it raises if the stack is missing. Here you can set erase_method to cv2 and get the pure-OpenCV path that runs on requirements.txt alone - the README's "OpenCV TELEA" story is real, it's just behind this switch. That's the difference between "needs several GB of model downloads" and "works on a fresh install." If you want Qwen-quality erasing but a smooth degradation story, eigen falls back to cv2 per-frame... except this node deliberately refuses that fallback, so pick cv2 upfront unless you're sure the stack is installed.

    The rest of the controls

    • video_path - a path to your video in ComfyUI's input folder (absolute paths work too).
    • detection_mode - anime_first (default) uses the bundled anime cascade, then MediaPipe, then YOLO; mediapipe_first, anime_only, and face_yolo_only change the order or pin one detector. face_yolo_fallback (true) lets the pipeline fall back to a YOLO face model if you have one at models/ultralytics/bbox/face_yolov8m.pt.
    • detection_confidence (0.5) - lower it if faces aren't being found; raise it to skip sketchy detections.
    • max_frames (0 = all) and frame_stride (1 = every frame) - the classic speed dials for long clips.
    • track_quad_scale (1.25), inpaint_scale (1.55), inpaint_radius (5) - how big the tracking quad and the erase mask are relative to the mouth. If the erased patch leaves mouth edges visible, bump inpaint_scale.
    • sprite_size (512), preserve_audio (true), plus optional angle_range_degrees / angle_step_degrees (45/15) and occlusion_filter (true).

    Outputs are the same ten strings as the upload node: mouthless_video, mouth_track_json, mouth_sprite_atlas_json, bundle_manifest_json, the five sprite paths (mouth_closed/mouth_half/mouth_open/mouth_e/mouth_u), and summary_json. Same bundle schema, so anything that consumes an upload-node bundle consumes this one.

    Install and troubleshooting

    Same pack install: ComfyUI Manager search for ComfyUI-PromptMaker-PNGTuber, or clone and pip install -r requirements.txt into the Python env ComfyUI uses, then restart. This class also has a compatibility alias registered as PromptMakerPNGTuberVideoMouth, which is the exact same node under an old name - if a workflow references that, it's this.

    The practical failure modes are all inherited from the pipeline: a video where the character never opens their mouth gets flagged requiresModelGeneration (then run the generated mouth applier pass), and if the mouth quad drifts on turns, the angle atlas bins exist precisely so the player can pick the nearest-angle sprite rather than stretch one. And if detection flat-out fails on a stylized or heavily occluded face, don't fight the cascade - that's the moment to use a manual bbox, which the eigen-path builders expose as manual_mouth_bbox but this node doesn't. Prefer switching detection_mode first.

    CategoryPNGTuber/Video Mouth

    Inputs (17)

    NameTypeDefaultDescription
    video_pathSTRINGinput_video.mp4
    output_dirSTRING
    asset_idSTRINGpngtuber_video_mouth
    max_framesINT00–20000
    frame_strideINT11–30
    detection_confidenceFLOAT0.500.1–0.95
    detection_modeCOMBOanime_first4 options: anime_first, mediapipe_first, anime_only, face_yolo_only
    face_yolo_fallbackBOOLEANtrue
    track_quad_scaleFLOAT1.251–4
    inpaint_scaleFLOAT1.551–4
    inpaint_radiusINT51–31
    erase_methodCOMBOeigen2 options: eigen, cv2
    sprite_sizeINT51264–2048
    preserve_audioBOOLEANtrue
    angle_range_degreesoptINT4515–75
    angle_step_degreesoptINT155–30
    occlusion_filteroptBOOLEANtrue

    Outputs (10)

    NameTypeDescription
    mouthless_videoSTRING
    mouth_track_jsonSTRING
    mouth_sprite_atlas_jsonSTRING
    bundle_manifest_jsonSTRING
    mouth_closedSTRING
    mouth_halfSTRING
    mouth_openSTRING
    mouth_eSTRING
    mouth_uSTRING
    summary_jsonSTRING