Nodes/Avatar Graph/Object Modifier Remove
ComfyUI Node

Object Modifier Remove

Delete a Blender modifier from inside your ComfyUI graph

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Modifier Remove
  • BPY_OBJ
  • BPY_OBJ
modifier
reportfalse

Object_ModifierRemove does exactly what its name says: it deletes a modifier from a Blender object, without you ever opening Blender. It's one of the auto-generated Object_* nodes in Avatar Graph (avatechai/avatar-graph-comfyui), Avatech's pack for turning a flat character image into a rigged, animatable avatar.

Why this node exists

Avatar Graph runs a real, headless copy of Blender - via the bpy Python package - inside your ComfyUI process. All the mesh work (segmentation, mesh layers, shape keys, shape flow) happens on objects living in that hidden Blender scene. The Object_* family is how the pack exposes Blender's object-level operators to the graph, and this node is a 1:1 wrapper for bpy.ops.object.modifier_remove().

You reach for it when a mesh layer picked up a modifier you don't want to keep - a Mirror or Subdivision Surface left by an upstream node - or when you want to strip temporary modifiers right before the Avatar Main Output node exports. Since removing a modifier is destructive (the object's data actually changes), it tends to live late in the chain.

How it works

Every Object_* node shares one piece of plumbing. It takes a BPY_OBJ - a reference to an object in the shared headless scene - marks it as the active object, runs its single Blender operator, and hands the same object back out. So this node is a passthrough that does one thing in the middle of your graph.

The inputs that matter

  • BPY_OBJ (in and out) - the object whose modifier you're removing. Wire it from an upstream node that emits BPY_OBJ, like Create Mesh Layer or Join Meshes.
  • modifier - a plain text field. Type the modifier's exact name, e.g. Mirror or Subdivision. No dropdown, and it must match character-for-character or the operator silently no-ops. This is the field that trips everyone up.
  • report - a boolean mapped from Blender's report popup. Headless mode has no popup, so you can leave it off.

Output: the same BPY_OBJ, so you can keep chaining more nodes.

Installing it

This node ships inside Avatar Graph, so you install the whole pack:

  • ComfyUI Manager: search "Avatar Graph" (repo avatechai/avatar-graph-comfyui), install, restart ComfyUI.
  • Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui && python -m pip install -r requirements.txt

Restart ComfyUI with --enable-cors-header if you want the live avatar preview.

The heavy dependency is bpy==3.6.0 - Blender's Python API - and it only builds for Python 3.10. On 3.11+ you'll hit "no module named bpy" and nothing from the pack will load. The README's Windows path is their bundled Python 3.10 environment (ComfyUI_3.10.7z, run run_nvidia_gpu_3.10.bat); on Linux/macOS use a conda env with python=3.10. First run also downloads the SAM ViT-H checkpoint plus mediapipe face/pose landmarkers into models/sams, so the first boot is slow.

Common gotchas

  • The modifier name is a string, not a choice. If Blender created Subdivision.001 (a duplicate), that's the exact string you must type.
  • The scene resets between runs. All Object_* nodes share one headless Blender scene that starts fresh each time the graph runs (Avatar Main Output triggers the reset). Objects only exist if an upstream node made them in the same run - don't expect state to survive between queues.
  • If the node seems to do nothing, you almost always gave it the wrong modifier name, or a BPY_OBJ that isn't actually the object you think it is.
Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
modifieroptSTRING
reportoptBOOLEANfalse

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ