πΊοΈ UV Coordinate Predictor
UV coordinates β how your texture actually wraps around the face mesh
- model
- image
- uv_map
- uv_coordinates
- status
A bare 3D face mesh is just a shape - a gray surface with no skin. To make it look like a person you need to map the photograph onto the geometry, and that's what UV coordinates are for: they tell the renderer which pixel of the texture goes on which part of the mesh. This node predicts exactly that. UVPredictor takes the face image and the loaded model and produces a UV map plus the raw UV_COORDS data, which is the piece that makes textured export possible further down the pipeline.
How it works
The node runs the image through a UV-prediction network at your chosen resolution, then post-processes the coordinates. confidence_threshold (0β1, default 0.5) is the honest one: UV predictions come with a per-pixel confidence, and anything below the threshold gets discarded rather than trusting garbage. If your map looks patchy, that's the threshold cutting things out - lower it. If it looks like a confident lie, raise it. uv_smoothing (0β1) blurs the coordinates afterward, which evens out jittery predictions at the cost of sharpness at feature boundaries like the eyes and mouth.
The inputs and outputs
- model - the
PIXEL3DMM_MODELcontainer from Pixel3DMMLoader. Required. - image - the face image. Required.
- output_resolution -
256,512, or1024(default 512). 512 is the practical default; 1024 only if you're exporting a high-res texture.
Optional: uv_smoothing (default 0) and confidence_threshold (default 0.5).
Outputs are uv_map (an IMAGE - the visualization you preview to check the mapping), uv_coordinates (the raw UV_COORDS), and status.
Where the outputs go
Two places, both worth knowing:
- Into FLAMEOptimizer -
uv_coordinatesplugs into itsuv_coordinatesinput as a constraint, so the optimizer can pull the mesh into alignment with where the texture actually maps. This is the standard "geometry and texture should agree" trick. - Into the export - MeshExporter's
include_texturesoption only does anything if the mesh carries UV data. So the chain isUVPredictor β (FLAMEOptimizer) β MeshExporter, and without the UV predictor doing its job, your OBJ exports as a textureless shell no matter what you toggle.
The honest caveat
You know the refrain by now, but it applies harder here than anywhere else. UV prediction on a face is a genuinely hard task - it requires the model to understand facial topology well enough to know the cheek maps to the "cheek" region of a canonical UV layout. The placeholder network this pack ships will produce coordinates, and they will be wrong, and the confidence threshold will merrily discard half of them. The node and its parameters are real and well-designed; the intelligence behind them is not, until you load a real checkpoint. Also note: this pipeline predicts UVs from a single image, which is the research-y part - most production face textures come from multi-view capture, not one photo.
Installing it
With the pack: ComfyUI Manager (search "Pixel3DMM"), or clone https://github.com/A043-studios/comfyui-pixel3dmm into ComfyUI/custom_nodes, pip install -r requirements.txt, restart. Run it after FaceReconstructor3D, and remember the uv_map IMAGE output is your visual check - if it doesn't look like a coherent face layout, don't bother exporting.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | PIXEL3DMM_MODEL | β | |
| image | IMAGE | β | |
| output_resolution | COMBO | 512 | 3 options: 256, 512, 1024 |
| uv_smoothingopt | FLOAT | 0.00β1 | β |
| confidence_thresholdopt | FLOAT | 0.500β1 | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| uv_map | IMAGE | β |
| uv_coordinates | UV_COORDS | β |
| status | STRING | β |