Mesh Primitive Cube Add
Blender's cube, straight from a ComfyUI node
- location
- rotation
- scale
- BPY_OBJ
If you landed here confused about why a "3D character rigging" pack ships a node that just makes a cube, that's a fair reaction. Avatar Graph (the pack this node lives in) exists to turn a flat character portrait into an interactive avatar that blinks and lip-syncs - segment the face, build mesh layers from the segments, rig them with shape keys, drive it all live through a graph they call Shape Flow. None of that strictly needs a cube. What's actually going on is simpler and a bit more mechanical: Avatar Graph runs real Blender under the hood, via the bpy Python package, inside ComfyUI's own process, and the pack's authors wrote a generator script (generate_blender_types.py, right there in the README) that turns every Blender mesh operator into a ComfyUI node automatically. Mesh_PrimitiveCubeAdd is one of roughly a hundred results of that - it's not hand-designed for avatars, it's Blender's own bpy.ops.mesh.primitive_cube_add wearing a node's clothes.
How it works
It does exactly what it says: spawns a cube mesh object into the scene. No mystery mechanism - same operator Blender's own Add menu calls when you hit Shift+A → Mesh → Cube. You won't find it in the pack's official demo templates (the eye-blink, lipsync, or dog-avatar workflows), because those build their meshes from segmented character images instead. This node is here for people building custom geometry into the pipeline by hand, or just poking at the mesh tools this pack happens to expose.
Inputs and outputs
Everything's optional with sane defaults, so you can drop it with zero configuration and get a 2-unit cube at the origin. The two you'd actually touch:
size(default 2) - the edge length of the cube.location,rotation,scale- standard XYZ vector sockets if you want to place it somewhere other than the world origin.
There's also calc_uvs (leave on unless you have a reason not to - it generates a basic UV map) and enter_editmode (spawns the cube already in edit mode; irrelevant for most graphs), plus an align enum (WORLD / VIEW / CURSOR) that only matters if you're aligning to a 3D cursor or viewport, which doesn't really apply to a headless graph. You'll also notice a seed field - that one's not actually a Blender parameter (the real cube-add operator has no randomness in it at all), it's almost certainly plumbing the pack bolted on to control ComfyUI's caching so the node re-runs when you want it to. Don't overthink it. The single output is BPY_OBJ, a live reference to the cube inside the running Blender session - wire it into any of the pack's other mesh nodes (selection, modification, the higher-level mesh-layer nodes) to keep building on it.
Installing it
Through ComfyUI Manager: search "avatar-graph-comfyui" (or "Avatar Graph"), install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/avatechai/avatar-graph-comfyui, then cd avatar-graph-comfyui && python -m pip install -r requirements.txt, then restart.
The one hard requirement that trips people up: Python 3.10.x, specifically, because that's what the bpy package this whole pack depends on is built against. The README is explicit about it and even recommends a dedicated conda env (conda create --name comfyui python=3.10) on macOS/Linux rather than fighting your existing setup. On Windows, they sidestep the problem entirely with a prebuilt ComfyUI + Python 3.10 zip you unzip over your ComfyUI folder before installing the pack through Manager. Restart with --enable-cors-header (macOS also wants --force-fp16) - that flag is what lets the pack talk to Avatech's web editor for the live 3D preview; without it the graph still runs fine, you just right-click the pack's Avatar Main Output node afterward and save the GLB/GLTF manually instead of watching it animate inside ComfyUI.
Common issues
The failure mode you'll hit most is the Python version mismatch - install this against 3.11 or 3.12 and bpy either won't have a matching wheel or won't build, and the whole custom-node pack fails to load. Check your Python version before anything else. Beyond that, this pack pulls in real dependencies most ComfyUI installs don't already have, so watch for it colliding with other custom nodes' pinned versions - a normal enough occurrence in an ecosystem where every pack brings its own requirements.txt. And the README itself carries a WARNING banner that nodes and demo templates are still changing, so if a parameter here shifts in a future update, that's the project evolving, not you doing something wrong.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| seedopt | INT | 00–18446744073709550000 | — |
| sizeopt | FLOAT | 2.000–999999995904 | — |
| calc_uvsopt | BOOLEAN | true | — |
| enter_editmodeopt | BOOLEAN | false | — |
| alignopt | COMBO | 3 options: WORLD, VIEW, CURSOR | |
| locationopt | B_VECTOR3 | — | |
| rotationopt | B_VECTOR3 | — | |
| scaleopt | B_VECTOR3 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |