ComfyUI Node
BD Face Strip Compose
Stitch 4 head-view photos into a single horizontal head-wrap strip via landmark-anchored cylindrical unwrap. Per detected view (front/left/right): TPS warp on all 478 MediaPipe landmarks → strip space. Cosine-bell confidence around the view's strip-center keeps each side dominant in its own slice. Rear views (undetected) are split at rear_split_x and slotted onto the strip edges with low confidence; the seam between rear-slot and the adjacent side view is added to inpaint_mask so Qwen redraws it. Outputs: - strip_image: stitched composite - coverage_mask: where the strip has any data - inpaint_mask: where Qwen SHOULD paint (low-coverage areas AND the rear-seam bands) - status: per-view diagnostic
BD Face Strip Compose
- images
- landmarks_batch
- rear_mask
- strip_image
- coverage_mask
- inpaint_mask
- status
◄front_index-1►
◄left_index-1►
◄right_index-1►
◄rear_index-1►
◄strip_width4096►
◄strip_height1024►
◄rear_split_x0.50►
◄rear_extent0.18►
◄rear_confidence0.50►
◄rear_blend_band0.08►
◄rear_flip_lrfalse►
◄rear_seam_width0.04►
◄bell_sigma0.22►
◄canonical_modecylindrical►
Category🧠BrainDead/FaceWrap
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Source photo batch — same order/count as the LANDMARKS_BATCH (typically 4 images: front, left, right, rear). | |
| landmarks_batch | BD_LANDMARKS_BATCH | From BD_FaceLandmarks. By default, view_hint per view picks which strip slot each image goes to. Override with the per-slot index inputs below when MediaPipe's yaw classifier misfires. | |
| front_index | INT | -1-1–63 | Image index for the FRONT slot. -1 = auto (use the first view classified as 'front'). Set to e.g. 0 to force image 0 into the front slot even if MediaPipe classified it differently. |
| left_index | INT | -1-1–63 | Image index for the LEFT slot (subject's left side, lands at strip-right). -1 = auto. |
| right_index | INT | -1-1–63 | Image index for the RIGHT slot (subject's right side, lands at strip-left). -1 = auto. |
| rear_index | INT | -1-1–63 | Image index for the REAR slot. -1 = auto (first undetected view, or first view classified as 'rear'). |
| strip_width | INT | 4096512–16384 | Output strip width (longitude direction). |
| strip_height | INT | 1024256–4096 | Output strip height (latitude direction). |
| rear_split_x | FLOAT | 0.500–1 | Column in the rear image where to split (0=left edge, 1=right edge). Right of the split → leftmost strip slot; left of the split → rightmost strip slot. |
| rear_extentopt | FLOAT | 0.180–0.35 | Fraction of strip width occupied by each rear half. 0.18 → each rear half takes ~18% of the strip (combined rear = ~36%, reaching the canonical ear/temple region where face and rear naturally meet anatomically). |
| rear_confidenceopt | FLOAT | 0.500–1 | Fixed confidence value applied to the rear slots. 0.5 default keeps rear visible while letting the side-view blend band still register. 0 → rear is pure fill that Qwen paints over. |
| rear_blend_bandopt | FLOAT | 0.080–0.2 | Width of the smooth blend band at the rear-slot boundary (fraction of strip width). Both the side-view bell and the rear-mask ramp linearly across this band so they cross at 50/50. Wider → longer crossfade region (better when rear/face colors differ a lot, but the underlying mix is still imperfect — that's what Qwen finalize fixes). 0 → hard cutoff. |
| rear_flip_lropt | BOOLEAN | false | Swap which half of the rear image goes to which strip edge. Default assumes a standard rear photo (photographer behind subject, same facing). Toggle if your rear photo is mirrored or shot from the front (e.g. with the subject turned around). |
| rear_maskopt | MASK | Head-silhouette MASK for the rear image — typically from BD_SAM3MultiPrompt('head') or any head/person segmentation. When provided, each rear half gets perspective-warped so its head silhouette fills the strip slot from edge to edge (matches the cylindrical warp geometry of the side views). Without it, the rear is plain cv2.resize-stretched (looks pasted on). | |
| rear_seam_widthopt | FLOAT | 0.040–0.2 | Width of the inpaint-flagged seam band on each side of the rear slots, as a fraction of strip width. 0 disables. |
| bell_sigmaopt | FLOAT | 0.220.05–0.5 | Half-width of the per-view cosine confidence bell (fraction of strip width). 0.22 keeps each side view dominant in its own slice without extrapolating across the centerline; smaller = sharper handoff (also reduces 'ghost face' at the ears, where side-TPS can extrapolate occluded back-of-head landmarks). Larger = wider but more cross-contamination between views. |
| canonical_modeopt | COMBO | cylindrical | How to project the canonical face landmarks into strip space. cylindrical = atan2(x,z) longitude, y latitude. (equirectangular / JSON layout: future.) |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| strip_image | IMAGE | — |
| coverage_mask | MASK | — |
| inpaint_mask | MASK | — |
| status | STRING | — |