Mesh Subdivide
Giving Avatar Graph's shape keys more geometry to bend
- BPY_OBJ
- BPY_OBJ
Every deformation you'll ever put on a mesh - a blink, a mouth opening, a smile - is only as smooth as the geometry underneath it. A low-poly plane bends into blocky facets; a subdivided one bends into a curve. Mesh_Subdivide is how you buy yourself that extra geometry before you start adding shape keys in Avatar Graph.
What it is and why you'd reach for it
This node is a direct wrap of Blender's own bpy.ops.mesh.subdivide() - Avatar Graph embeds the bpy library inside ComfyUI, and most of its Mesh_* nodes are thin passthroughs to Blender's built-in mesh-editing operators, this one included. It splits each selected face/edge into smaller pieces, multiplying your vertex count.
Where it fits: Avatar Graph builds a mesh from a flat image plane (via Create Mesh Layer), and that plane starts life about as low-poly as it gets. If your rig's shape keys need to deform smoothly - a mouth stretching open, cheeks puffing - subdividing first gives those blend shapes somewhere to actually curve. Skip it and animated shapes look faceted and cheap. Overdo it and you're pushing a lot more geometry through the real-time Shape Flow runtime for no visual gain, so it's a knob to turn deliberately, not maximize.
Inputs and outputs that matter
BPY_OBJ(optional) - the mesh coming from upstream.number_cuts(int, default 1, 1–100) - how many times each selected edge gets split. 1 roughly doubles resolution; go higher and you're multiplying it fast. Most character work needs 1–3, not more.smoothness(float, default 0, 0–1000) - 0 gives a flat/linear subdivide (new verts land exactly on the old surface); higher values pull new geometry toward a smoothed curve, like a lightweight Catmull-Clark pass. Small values (well under the max) go a long way.ngon(bool, default True) - whether n-gons stay whole or get split at their natural cut points.quadcorner(enum: INNERVERT, PATH, STRAIGHT_CUT, FAN) - controls how the diagonal cut runs through a quad's corners. Leave on the default unless a specific subdivision pattern is causing a visible pinch.fractal/fractal_along_normal/seed- adds randomized displacement to the new vertices, essentially a built-in noise pass. For character rigging you'll almost always leavefractalat 0; it's really there for organic/terrain-style use, not clean avatar geometry.
Output is a single BPY_OBJ - feed it into more Mesh_* cleanup nodes, or straight on to shape keys.
Same rule as every other node in this family: it operates on the current selection, Blender-style. No selection upstream means no visible change, even with number_cuts cranked up.
Installing Avatar Graph
bpy - the library this whole pack is built on - only ships wheels for Python 3.10.x, so that's the constraint to satisfy first.
ComfyUI Manager: search avatar-graph-comfyui, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui.git
cd avatar-graph-comfyui
python -m pip install -r requirements.txt
Restart with python main.py --enable-cors-header (--force-fp16 too, on Mac). Windows users get a prebuilt Python 3.10 environment from the README specifically to dodge the pip version fight; macOS/Linux users are pointed at a dedicated conda create --name comfyui python=3.10.
Common issues
Nodes missing after install - almost always the Python version. bpy fails to import silently outside 3.10.x, and the whole pack won't load. Check python --version first.
No live preview panel - needs --enable-cors-header for the embedded editor.avatech.ai view to connect. Without it, run the graph normally and export via right-click → Save File on Avatar Main Output (.GLB/.GLTF), then preview in Blender or any other viewer.
Mesh count exploding unexpectedly - remember number_cuts compounds every time you run the node, and a wide selection with high fractal will visibly wobble your silhouette. If your character mesh suddenly looks noisy or heavier than expected downstream, this is usually the node to check first in the chain.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| number_cutsopt | INT | 11–100 | — |
| smoothnessopt | FLOAT | 0.000–1000 | — |
| ngonopt | BOOLEAN | true | — |
| quadcorneropt | COMBO | 4 options: INNERVERT, PATH, STRAIGHT_CUT, FAN | |
| fractalopt | FLOAT | 0.000–1000000 | — |
| fractal_along_normalopt | FLOAT | 0.000–1 | — |
| seedopt | INT | 00–2147483647 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |