Object Subdivision Set
Making a mesh smoother in ComfyUI without leaving the graph
- BPY_OBJ
- BPY_OBJ
Subdivision is the cheap trick of making a low-poly mesh look round: every edge gets split, every face gets cut, and the geometry gets denser. In a rigging graph like the Avatar Graph pipeline - where you're turning a segmented 2D character image into a 3D mesh you can later deform with shape keys - that extra density is what lets smooth eye-blinks and mouth shapes deform without looking faceted. Object Subdivision Set is how you crank that level from inside ComfyUI.
What's actually happening under the hood matters here, because it's weirder than your usual custom node. This node is a thin wrapper over a real Blender operator, bpy.ops.object.subdivision_set. The Avatar Graph pack embeds a headless Blender 3.6 (bpy) inside your ComfyUI process, and nodes like this one just call the operator on the object whose reference arrives on the BPY_OBJ wire. The pack auto-generates hundreds of these wrappers from Blender's own operator registry, which is why the node's display name sounds like a menu item rather than a ComfyUI invention.
The inputs are the two knobs the operator exposes. BPY_OBJ is the mesh - wire in whatever object you created from your character image. level is the number of subdivision steps, default 1, and it's the one you'll actually touch: 1 keeps things cheap, 2 starts to look smooth on a face mesh. relative is a boolean that's mostly meaningful if the object carries a Multires modifier - it makes level apply on top of the current subdivision count instead of setting an absolute one. For a plain character mesh you can leave it off.
The output is the same BPY_OBJ, mutated in place - the pack's nodes almost all follow that pattern, passing the same object onward down the chain. Feed it into the next mesh operation or straight toward the shape-key setup.
Install. This node ships inside the Avatar Graph pack, so you install the whole thing. ComfyUI Manager: search "Avatar Graph". Or clone it yourself:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui && python -m pip install -r requirements.txt
The catch: bpy==3.6.0 only ships wheels for Python 3.10, so a modern 3.11/3.12 venv will fail at pip install. The README's Windows instructions hand you a prebuilt 3.10 ComfyUI env to avoid exactly this fight. Expect a heavy first install (bpy, opencv, mediapipe, segment-anything from GitHub) and a slow first launch - the pack auto-downloads the ~2.4 GB SAM ViT-H model into ComfyUI/models/sams/ on startup.
Where people get burned: the pack resets the Blender scene to factory settings on the first node of each run, so nothing you subdivide "keeps" between runs - you re-run the whole graph and it rebuilds. And note this operator changes the subdivision level, not the permanent vertex count; if you need genuinely denser geometry baked in, you want the mesh-level subdivide ops instead. Both behaviors are the Blender operator doing exactly what it always does, just without a visible viewport to prove it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| levelopt | INT | 1-100–100 | — |
| relativeopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |