Nodes/Avatar Graph/Object Instance Offset From Object
ComfyUI Node

Object Instance Offset From Object

Make your duplicates orbit a point that isn't them

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Instance Offset From Object
  • BPY_OBJ
  • BPY_OBJ

Object_InstanceOffsetFromObject does one small thing that's easy to underrate: it points an object's instance offset at another object's origin. In Blender, the instance offset is the pivot that duplicated instances - from an Array modifier, a particle system, or dupliverts - arrange themselves around. By default that pivot sits at the object's own origin, which is why a row of duplicates usually grows out of your model's center rather than the spot you actually wanted. This node is how you move that pivot to somewhere sane.

When you'd use it

Honestly? Rarely, in the stock avatar workflow. The eye-blink and lipsync templates don't use it. Where it earns its keep is when you're building supporting geometry or procedural decoration for your scene - eyelash arrays, a string of lights around a stage, anything where you want copies fanned out around a reference point. Think of it as the "place the cursor elsewhere" step, but for instance offsets.

How it works

Like most nodes here, Object_InstanceOffsetFromObject is a thin auto-generated wrapper around a Blender operator - bpy.ops.object.instance_offset_from_object. The node takes your BPY_OBJ, makes it the active object in the headless Blender scene, and runs the operator. The operator itself reads the rest of its context from Blender, typically using the currently selected object as the reference for where the offset should land. There are no extra parameters on this node, because the operator takes none - the reference object is decided by selection state, which is a bit invisible when you're working in a graph.

That's worth flagging: because the pack runs everything inside one shared headless Blender scene, selection state is real and global across your whole graph. If the offset lands somewhere unexpected, the usual culprit is which object happens to be selected when this node fires.

Inputs and outputs

  • BPY_OBJ (optional) - the object whose instance offset gets set. Disconnected, and it acts on the current active object.
  • Output: BPY_OBJ - the same object, passed through so you can keep chaining operations.

The mutation is in the scene, not in the handle, so don't expect to see a value change on the output wire.

Install and gotchas

It ships with the full pack:

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

or search "Avatar Graph" in ComfyUI Manager. The pack pins bpy==3.6.0, which is picky about running on Python 3.10, and on first launch it downloads the SAM ViT-H checkpoint (~2.5GB) plus a couple of mediapipe models - so the first start is chunky even before you run a workflow.

The house rules apply here too: the Blender scene resets to factory settings on every graph run, so objects and their offsets are rebuilt each execution, and object handles don't survive between runs. If you want the live avatar preview rather than just exporting GLB/GLTF from Avatar Main Output, launch with --enable-cors-header.

Object_InstanceOffsetFromObject is a niche tool for a specific moment: the moment your duplicates fan out around the wrong point. When that moment hits, it's exactly the node you want.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ