Assign Vertex Group Ops
Naming a selection so later nodes can target it
- BPY_OBJ
- BPY_OBJ
This small node is the missing link between selecting vertices and doing something meaningful with them in Avatar Graph, avatech.ai's pack for building rigged, interactive avatars from character art inside ComfyUI. It wraps Blender's vertex-group-assign operation: take whatever vertices are currently selected on a mesh and save that selection under a name, creating the group if it doesn't exist yet.
Why this matters in a graph-built rig
Vertex groups are Blender's way of naming a subset of a mesh's vertices so other tools - modifiers, weight painting, and in this pack's case, shape-key deformation - can target that exact subset later by name instead of by re-selecting it every time. In a normal Blender session you'd select vertices in edit mode and click "Assign" in the vertex groups panel. In a ComfyUI graph there's no edit-mode viewport to click in, so this node exists to do that step programmatically: whatever selection state your mesh is in when this node runs gets saved as a named group.
The pairing to know: this is almost always followed downstream by a shape-key node like Transform Shape Key (ApplyMeshTransformAsShapeKey), whose target_vertex_group field expects exactly the name you set here. Get the names to match and the eyelid, mouth, or whatever region you selected becomes a deformable target; mismatch them and the shape-key node has nothing to act on.
Inputs and outputs
Two inputs, both optional: BPY_OBJ, the mesh you're working on, and name (default "Group"), the string the resulting vertex group gets saved under. That's the whole surface - there's no selection logic exposed here, because the selection itself needs to already be set by an earlier node in the graph (something upstream that selects vertices or a hierarchy) before this one runs. Output is the same BPY_OBJ, now carrying a new (or updated) vertex group.
Installing it
Through ComfyUI Manager, search avatar-graph-comfyui, or clone it directly:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui && python -m pip install -r requirements.txt
Same constraint as every mesh-editing node in this pack: it runs on bpy, and bpy needs Python 3.10.x specifically. That's the thing to sort out before worrying about anything else - a dedicated conda environment on Mac/Linux (conda create --name comfyui python=3.10), or the README's prebuilt Python 3.10 ComfyUI zip on Windows. Restart afterward with --enable-cors-header if you want the live avatar preview panel to work with editor.avatech.ai.
Troubleshooting
If a shape-key node downstream isn't affecting the vertices you expect, work backward to this node first: confirm the name here exactly matches what the shape-key node's target field references, since there's no dropdown syncing them - a typo in either place breaks the link silently. If the group ends up empty (the shape key does nothing at all), the real cause is usually upstream of this node: whatever's supposed to select the vertices before this runs isn't actually selecting anything. This is exactly the kind of small plumbing node that's easy to overlook when a rig isn't behaving - check the name match here before assuming a more complex node further down the chain is broken.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| nameopt | STRING | Group | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |