Nodes/Avatar Graph/Object Set Up Axis
ComfyUI Node

Object Set Up Axis

Which way your avatar actually stands

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Set Up Axis
  • BPY_OBJ
  • BPY_OBJ
valueZ

Avatar Graph is Avatech's pack for turning a flat 2D character image into a rigged, animatable avatar - blink, lip-sync, react - by running an embedded copy of Blender (the bpy pip package) inside ComfyUI. The ObjectSet_* nodes are its property setters: each one grabs the Blender object that shows up on its BPY_OBJ input, sets exactly one property on it, and hands the same object back. Object Set Up Axis is the one that decides which world axis counts as "up" for that object.

What it actually does

In Blender, objects carry an up_axis flag that tells the tools "this way is up" when the object gets placed, aligned, or displayed as an image. For an avatar that's a meaningful choice: your character mesh is a textured plane, and whether it stands upright in front of the camera or lies flat is an orientation decision, not a coincidence. The default value here is "Z", which is what you want for a standing character - Z-up, the way humans and game characters are usually built. Flip it to "Y" and you're effectively telling Blender the object's up is the Y axis, which is the orientation you'd reach for if your "avatar" is meant to be viewed top-down rather than face-on.

Worth knowing where this node comes from: the pack generates one ObjectSet_ node for every simple attribute Blender exposes on its object type (you can see the full list in the pack's blender/ops_mesh.py). Nothing here is hand-tuned for avatar work - you're getting direct, unfiltered access to a Blender property, which is both the power and the footgun of the whole family.

The inputs and outputs that matter

Only two:

  • BPY_OBJ - the object you're reorienting. Usually whatever came out of Object Create Mesh Layer or Object Join Meshes.
  • value - a string, default "Z". Set it to the axis identifier you want ("Z", "Y", and so on).

Output is a single BPY_OBJ, the same object with up_axis applied. It chains straight into whatever Blender node comes next in the graph, and eventually into Create Shape Flow / Avatar Main Output.

How to install it

No standalone install - this ships with the whole Avatar Graph pack. Easiest route is ComfyUI Manager, searching "Avatar Graph". By hand:

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

Then restart ComfyUI. The gotcha that breaks installs: the pack pins bpy==3.6.0, and Blender's Python API only ships wheels for Python 3.10.x. On any newer Python the pip install just fails. Use a dedicated env (conda create --name comfyui python=3.10) on Linux/macOS, or Avatech's prebuilt Python-3.10 ComfyUI zip on Windows. First launch also auto-downloads a SAM ViT-H checkpoint and MediaPipe face/pose landmarkers, so it'll churn for a bit.

Gotchas

If your character renders sideways or lying down and you never touched this node, check whether an upstream step changed the plane's orientation - this is one of the few ObjectSet nodes where the default "Z" is almost always right and the wrong value is visibly, embarrassingly wrong. Also remember value is a plain string: the exact identifier matters, so "Z" and "z" are not the same thing to Blender.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
valueoptSTRINGZ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ