Nodes/Avatar Graph/Object Lightprobe Cache Free
ComfyUI Node

Object Lightprobe Cache Free

The memory-cleanup node for your avatar's baked lighting

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Lightprobe Cache Free
  • BPY_OBJ
  • BPY_OBJ

Every bake leaves residue. When you bake light-probe caches in Blender's EEVEE, the irradiance/reflection data sits in memory, holding onto the scene's lighting state. Object_LightprobeCacheFree is the node that wipes it - bpy.ops.object.lightprobe_cache_free(), the "Free Cache" button from Blender, exposed in the Avatar Graph pack.

It's the cleanup half of the light-probe pair: Object_LightprobeCacheBake writes the cache, this node throws it away. In a graph that rebuilds its entire Blender scene on every run, that's occasionally exactly what you want - stale cached lighting from a previous iteration can leak into a fresh scene and make your avatar's lighting wrong in ways that are miserable to debug.

How it works

It calls the cache-free operator on the scene's light probes. BPY_OBJ sets the active object context and passes back through unchanged. There are no other inputs - the operator frees the probe cache data held in memory, so the next bake starts from a clean slate rather than inheriting leftover irradiance.

The subtle value here: the pack resets the scene between runs with Blender's factory settings, but probe cache data isn't always a fresh-scene casualty - it can survive a rebuild and leave you chasing phantom lighting. Freeing the cache at the start of a lighting section of your graph makes every bake deterministic.

When you'd use it in an avatar graph

Two spots. First, as a reset at the top of a lighting chain, before you add lights and probes - guarantees you're baking against nothing stale. Second, after you've previewed or exported and before a branch that changes the lighting setup, so a re-bake doesn't blend old and new data. For a simple one-shot avatar export you can honestly skip it; it earns its keep in iterative, multi-branch graphs.

Inputs and outputs

  • BPY_OBJ - active object context; returned unchanged.
  • BPY_OBJ output - pass-through.

Installing it

Part of Avatar Graph (avatechai/avatar-graph-comfyui). ComfyUI Manager: search "Avatar Graph". Manual:

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

Pack constraints: bpy==3.6.0 requires Python 3.10.x, and first launch auto-downloads the SAM ViT-H checkpoint (~2.5 GB) and MediaPipe models.

Common issues

Honestly, this node is hard to get wrong - the main confusion is expecting it to do something visible. It frees data; it doesn't change what you see until you bake again, so "I freed the cache and nothing happened" is the expected outcome. The real trap is the opposite: forgetting to free or re-bake between lighting iterations and then wondering why your preview lighting looks stuck. And as with everything in this pack, the README flags it as a work-in-progress, so don't be surprised if node behavior shifts.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ