Nodes/Avatar Graph/Object Call Cache Release
ComfyUI Node

Object Call Cache Release

Freeing Blender's evaluated-mesh cache mid-graph

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Call Cache Release
  • BPY_OBJ
  • BPY_OBJ

This one's a naming clue worth noticing: everything else in Avatar Graph's Blender set is prefixed Mesh_, Object_, Transform_, or UV_ - the bpy.ops operator categories. Object Call Cache Release is prefixed ObjectCall_, and that's because it isn't an operator at all. It's a direct call to Object.cache_release(), a Python method on Blender's Object type rather than something you'd find in an operator menu.

How it works

Every time Blender evaluates a mesh with modifiers on it, it builds and holds an evaluated copy - the version you actually see, post-modifiers - in memory, keyed to that object, so repeated reads (renders, exports, further edits) don't have to re-run the modifier stack each time. cache_release() explicitly discards that cached evaluated data for the object, forcing a fresh evaluation next time something asks for it. It's a memory-management call, not a mesh-editing one: nothing about the object's actual data changes, only what's cached.

In an Avatar Graph pipeline that's chaining a lot of mesh generation, joins, and modifier-driven deformation for the Shape Flow rig, evaluated-mesh caches can pile up. This node is the escape hatch for explicitly clearing one mid-graph rather than waiting for Blender's own memory management to get around to it.

The inputs and outputs that matter

There's exactly one input worth knowing, and it's the object itself:

  • BPY_OBJ - the object whose evaluated-mesh cache gets released.

No other parameters - this call takes no arguments beyond the object. Output is the same BPY_OBJ, passed through unchanged (its actual mesh data isn't touched; only the cached evaluated copy is).

How to install it

ComfyUI Manager: search "Avatar Graph" and install. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/avatechai/avatar-graph-comfyui, cd avatar-graph-comfyui && pip install -r requirements.txt, then restart. Like every node in this pack, it depends on bpy - Blender running as a library - which only publishes wheels for Python 3.10.x. A newer ComfyUI environment either fails the install outright or leaves the whole blender node category, this one included, absent from your node list. macOS/Linux: dedicated conda env pinned to 3.10; Windows: Avatech's prebuilt Python-3.10 ComfyUI zip, pack installed through Manager afterward.

Common issues & troubleshooting

You added this expecting a visible effect and got none. That's correct behavior - this node changes what's cached, not what's in the mesh. If you're chasing a visual bug, this isn't the node that fixes it; if you're chasing memory bloat over a long graph with a lot of modifier-heavy BPY_OBJ chains, this is exactly the tool.

Genuinely unclear whether you need it at all. Honestly? Most Avatar Graph workflows won't. This is a memory-hygiene node for advanced, heavy graphs - the README's own documented node table doesn't mention it, and it's not something the pack's example workflow templates lean on. If your graph runs fine without it, there's no reason to add it just because it exists.

No indication it did anything. Correct again - cache_release() returns nothing meaningful to inspect from inside a ComfyUI graph; you'd only notice its effect indirectly, through lower memory use on a long-running or repeated-execution graph, not through any change in the node's own output.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ