Nodes/ComfyUI-BrainDead/BD Face Texture Bake
ComfyUI Node

BD Face Texture Bake

Bake source photos into the canonical UV layout using nvdiffrast. By DEFAULT bakes every detected view and outputs (uv_textures, confidences) batches that plug straight into BD_UVConfidenceBlend. uv_layout_mask is view-independent: it marks every UV-atlas texel that maps to a mesh triangle (the full target region). Wire it into BD_UVConfidenceBlend.target_mask so the inpaint_mask covers gaps no view managed to fill. Set view_index >= 0 to bake just one view (debug/inspection); the output is still a 1-length batch so wiring is unchanged. Undetected views (rear / failed detection) are skipped — they carry no usable landmarks, so they contribute nothing to a face-UV bake.

By BizaNator·Created 7 months ago·Updated 16 days ago· 14
BD Face Texture Bake
  • images
  • face_fit
  • uv_textures
  • confidences
  • uv_layout_mask
  • status
view_index-1
texture_size2048
min_confidence0.00
Category🧠BrainDead/FaceWrap

Inputs (5)

NameTypeDefaultDescription
imagesIMAGESource photo batch — same order/count as the LANDMARKS_BATCH the FACE_FIT was built from.
face_fitBD_FACE_FITFACE_FIT from BD_FaceFit. Provides canonical mesh + per-view 2D vertex positions.
view_indexINT-1-1–63-1 = bake ALL detected views (default). >= 0 = bake only that view index.
texture_sizeINT2048256–8192Output UV texture resolution.
min_confidenceoptFLOAT0.000–1Texels with face-cosine below this are zeroed in the mask.

Outputs (4)

NameTypeDescription
uv_texturesIMAGE
confidencesMASK
uv_layout_maskMASK
statusSTRING