Nodes/Avatar Graph/Object Shape Key Retime
ComfyUI Node

Object Shape Key Retime

Fix the timing between shape keys

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Shape Key Retime
  • BPY_OBJ
  • BPY_OBJ

Shape keys animate on a timeline, and "retiming" is what you do when a key's animation is hitting at the wrong moment - an eye blink that closes a beat too late, a mouth that opens just after the audio says it should. Object Shape Key Retime wraps bpy.ops.object.shape_key_retime, Blender's operator for retiming shape key animation relative to a reference.

In Blender this operator is tied to the shape-key retiming utility (the one VRM/glTF riggers lean on), and it re-times a shape key's animation so its pose lines up with a reference key's timing. The practical effect: you set your reference timing on one key and this node makes the active key's animation match that timing rhythm, instead of eyeballing keyframes one by one.

How it works

Auto-generated wrapper, standard for the pack. Your incoming BPY_OBJ becomes the active object, the operator runs on the active shape key, and the object passes back out. It has no extra parameters - no timing value, no target frame, nothing. Retiming configuration in Blender lives in the shape key's animation data, so this node is a "do the retime" button rather than a settings panel.

The inputs that matter

Just BPY_OBJ. Which key gets retimed is "the active one," same as the rest of the shape-key family, so sequencing your graph so the right key is active matters just as much here.

Output is one BPY_OBJ, unchanged.

Install

Standard Avatar Graph install - one repo for every node in the pack. ComfyUI Manager: search Avatar Graph, install, restart. 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

The pack pins bpy==3.6.0, which effectively requires Python 3.10, and first launch downloads the ~2.5 GB SAM checkpoint plus MediaPipe landmarkers.

Common issues

Retiming quietly does nothing useful if the shape key has no animation data to retime - a static key has no timing to fix, so this node is meaningless on keys you drive purely via the Shape Flow runtime. Retiming targets timeline-keyed shape key animation, which in this pack usually means shapes you baked or keyframed inside the embedded Blender.

Real talk: this is one of the more obscure nodes in the whole pack, and you're unlikely to need it for a basic eye-blink/lipsync avatar. The Shape Flow runtime handles per-frame values on its own. Reach for Retime when you're mixing keyframed animation with driven shapes and the two are out of sync - and then expect to verify the result by exporting the avatar, since the embedded scene doesn't give you a timeline to watch.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ