Nodes/Avatar Graph/Object Delete
ComfyUI Node

Object Delete

Cleaning up scrap objects in an Avatar Graph scene

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Delete
  • BPY_OBJ
  • BPY_OBJ
use_globalfalse
confirmtrue

This is the one that does exactly what it says: Object Delete removes an object from the Blender scene Avatar Graph is running under the hood. If you've built a graph that spins up a bunch of intermediate helpers - a temporary Empty, a reference plane you only needed for alignment, a leftover mesh layer from a segmentation pass you decided not to use - this is the node that gets rid of them so they don't clutter the scene or sneak into an export.

How it works

It's a direct wrap of Blender's bpy.ops.object.delete(). Avatar Graph, remember, is running real Blender via bpy inside ComfyUI - every Object_* node in this pack is a thin wrapper around one of Blender's own object.* operators, and this is the deletion one. Once it runs, the object and its data are gone from the scene; there's no undo node in this pack, so treat it the way you'd treat any delete in a script - deliberate, not exploratory.

The inputs and outputs that matter

  • BPY_OBJ - the object to delete.
  • use_global (bool, default false) - Blender's underlying operator can optionally unlink an object from every scene it's linked into, versus just the current one. Avatar Graph pipelines run in a single scene, so in practice this rarely changes anything you'd notice.
  • confirm (bool, default true) - mirrors the "are you sure?" popup Blender shows in its interactive UI. Since a headless graph execution never shows that popup either way, this one's along for the ride rather than something you need to tune.

Output is a BPY_OBJ - but be clear-eyed about what that means here: it's the same handle threaded through so the node can still sit in a chain, not a live reference to something that still exists. The object it points at is gone. If a downstream node errors out complaining the object is invalid, that's this node doing its job, not a bug.

How to install it

Through ComfyUI Manager: search "Avatar Graph" or avatar-graph-comfyui, install, restart. Or manually:

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 dependency that actually bites is bpy itself - it only ships wheels for Python 3.10.x, full stop. On macOS/Linux, build a dedicated environment (conda create --name comfyui python=3.10) rather than bolting it onto whatever newer Python your ComfyUI install already uses. Windows users can skip that entirely with Avatech's prebuilt Python-3.10 ComfyUI zip from the README, then add the pack through Manager. Restart with python main.py --enable-cors-header (add --force-fp16 on Mac) if you want the live avatar preview talking to editor.avatech.ai; without it, you still get full functionality, you just export .glb/.gltf and check results elsewhere.

Common issues & troubleshooting

If the node itself won't load, that's almost always the Python-version mismatch above, not this operator - check ComfyUI's startup console for an import error on bpy.

The mistake people actually make with this node is downstream, not upstream: chaining more Blender operations onto the BPY_OBJ this node outputs, expecting the object to still be there. It won't be. If you need to keep operating on something after a cleanup step, delete it last, or delete a different helper object than the one you're about to keep using - don't route the object you deleted back into more nodes.

Community reports of this pack (it's still an early, actively-changing project per the README's own warning) tend to focus on the animation/rigging results rather than the individual Blender-operator nodes - Object_Delete itself is about as low-drama as this family gets. If anything's fragile in a graph that leans on it, it's usually the broader Python-environment setup, not this operator specifically.

Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
use_globaloptBOOLEANfalse
confirmoptBOOLEANtrue

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ