Nodes/Avatar Graph/Mesh Faces Mirror Uv
ComfyUI Node

Mesh Faces Mirror Uv

Stop hand-mirroring UVs on symmetric meshes

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Faces Mirror Uv
  • BPY_OBJ
  • BPY_OBJ
direction
precision3

Symmetric geometry - a left eye and a right eye, two sides of a face - usually needs matching UV layout on both halves so a texture applies consistently. Doing that by hand means selecting the mirrored faces yourself and copying coordinates across manually. This node automates it: it looks for faces on the opposite side of the mesh that geometrically match your selection (by position, within a tolerance) and copies the UV layout across to them, so both sides line up without you doing it point by point.

The two settings that control matching

  • direction - an enum choosing which side is treated as the source: POSITIVE or NEGATIVE, relative to the mesh's local X axis. Whichever side holds the UVs you actually want kept is the one you pick as the source.
  • precision (INT, default 3, range 116) - the tolerance for deciding two vertices count as mirrored duplicates of each other. It's effectively how many decimal places of positional match are required before the operator treats a face as the mirror of another. If faces aren't getting matched at all, that's the setting to loosen first; if it's matching things that clearly aren't actually mirrored, tighten it.

Plus the standard optional BPY_OBJ input and BPY_OBJ output. It's a direct wrap of Blender's bpy.ops.mesh.faces_mirror_uv, one of twenty low-level Blender operator wraps this pack ships without documenting in its own README (that document's node table covers the headline pieces: Create Mesh Layer, Mesh Modify Shape Key, Avatar Main Output). The repo's dev notes describe regenerating Blender operator bindings via a generate_blender_types.py script, which is exactly where this naming pattern comes from.

Where it fits

Avatar Graph, from Avatech AI, turns a single character image into a 2.5D interactive avatar - segmentation, per-layer mesh generation, shape-key rigging for blink and mouth movement, then a live view through Avatech's own hosted editor. A lot of the geometry this pack works with is deliberately symmetric - eyes, in particular, get built and rigged as a matched pair. Automating the UV mirror between them instead of eyeballing it by hand is a real, practical win, especially if you're hand-fixing texture mapping on a mesh the pipeline generated.

Installing Avatar Graph

Search "Avatar Graph" in ComfyUI Manager and install, or go manual: cd ComfyUI/custom_nodes && git clone https://github.com/avatechai/avatar-graph-comfyui, then python -m pip install -r requirements.txt inside that folder, then restart. Watch out - the README's own manual-install command clones from avatechgg, a different org than the canonical avatechai/avatar-graph-comfyui; use the URL above instead.

What actually gates a successful install is Python version. bpy, Blender's Python API and this pack's core dependency, only ships wheels for specific Python builds - you need 3.10.x. A modern ComfyUI on Python 3.11/3.12 will fail to install or import it. Conda is the clean fix on Mac/Linux (conda create --name comfyui python=3.10); on Windows, the author ships a dedicated prebuilt ComfyUI + Python 3.10 zip rather than a retrofit.

Once running, restart with python main.py --enable-cors-header (Mac: add --force-fp16) if you want the live avatar preview reaching Avatech's hosted editor. Skip it and everything still works - export manually via right-click → Save on Avatar Main Output instead.

Common issues

No model downloads, nothing unusual beyond bpy - install pain is almost always the Python pin, preview pain almost always the missing CORS flag. The README's own warning that nodes and templates are still evolving is a fair excuse for the total lack of built-in description here.

The real day-to-day issue with this node is precision. If your mesh's mirrored halves aren't perfectly symmetric down to the last decimal - which is common on anything hand-adjusted or generated rather than built with a mirror modifier - the default of 3 can be too strict and simply fail to find matches. Try lowering it a step or two before assuming the mirroring itself is broken.

Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
directionoptCOMBO2 options: POSITIVE, NEGATIVE
precisionoptINT31–16

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ