Nodes/Avatar Graph/UV Average Islands Scale
ComfyUI Node

UV Average Islands Scale

Evening out UV island scale so one part of your texture isn't blurrier than the rest

By avatechai·Created 3 years ago·Updated 2 years ago· 264
UV Average Islands Scale
  • BPY_OBJ
  • BPY_OBJ
scale_uvfalse
shearfalse

UV Average Islands Scale makes every UV island the same texel density. It wraps bpy.ops.uv.average_islands_scale, which rescales the selected islands so they all sample the texture at roughly the same resolution - no more one island hogging detail while its neighbor stretches and blurs. For a character built from segmented image layers, this is the node that stops your eyes from being crystal-clear while your mouth is a smear.

Why it matters in this pack specifically: Avatar Graph's characters are textures, stretched over mesh planes, and the seams between mesh layers are exactly where inconsistent UV scale shows up. When you unwrap a face with a cube projection, some islands end up larger in UV space than others - meaning different parts of the character art render at different sharpness. Averaging the scale evens that out before you bake or export.

How it works

A UV_* EditOps node: enter edit mode, run bpy.ops.uv.average_islands_scale on the selected UVs, exit, return the object. Two inputs:

  • scale_uv - also scale the islands' UV values themselves (not just the ratio between them). On when you want the whole set resized together; off when you only want relative evenness. For most cleanup work you leave it off.
  • shear - average out the shearing between islands as well, fixing islands that are skewed relative to each other. On for thorough cleanups, off when you only care about scale.

The node equalizes against the selected islands, so the selection determines what gets averaged. If you select everything, it balances the whole mesh; if you select a sub-region, it balances within that region only. That's the knob you actually control, and the same selection caveat that runs through every edit-mode node in the pack applies: the wrapper has no selection input, so the shared scene's current selection is what the operator sees.

Inputs that matter

  • BPY_OBJ - the mesh.
  • scale_uv / shear - leave both off for a first pass; flip them on if the result still looks uneven.

Output: BPY_OBJ - the mesh, UVs rebalanced, for the next node.

Installing it

Part of the Avatar Graph pack. ComfyUI Manager → search "Avatar Graph", or:

cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui && python -m pip install -r requirements.txt

Restart after. Pack gotchas: bpy==3.6.0 requires Python 3.10.x (a 3.11+ env breaks the pack's import), and first launch downloads the SAM ViT-H model (~2.5 GB) to ComfyUI/models/sams plus two MediaPipe landmarker files.

Common issues

  • "No module named bpy" → Python 3.10.x. The pack's one repeated answer.
  • "It did nothing" → no UVs selected, or all islands already at equal scale. Select deliberately upstream.
  • Detail got worse somewhere → averaging redistributes density; a tiny island at high density will be pulled down to match its neighbors. If one feature must stay sharp, exclude it from the selection before averaging.
  • Scene resets between runs - unwrap, average, and export in one graph.

It's not a node you'll use on every avatar - many textures don't need it. But the first time you spot a blurry mouth next to a crisp eye, you'll know exactly where to go.

Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
scale_uvoptBOOLEANfalse
shearoptBOOLEANfalse

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ