Nodes/ComfyUI-Keyframed/Parameter Group + Curve (addition)
ComfyUI Node

Parameter Group + Curve (addition)

One curve, applied to every curve in the group

By dmarx·Created 3 years ago·Updated 2 years ago· 92
Parameter Group + Curve (addition)
  • parameter_group
  • curve
  • PARAMETER_GROUP

Here's the move that makes parameter groups feel like magic: add a single curve to a whole group and every curve inside the group shifts by it, all at once. KfPGroupCurveAdd takes a parameter group and a KEYFRAMED_CURVE and returns a new group where each member curve has been added - point by point, keyframe by keyframe - to the input curve. If you've got six animated parameters and you want all of them to ramp up over the last ten frames, this is the one-shot way to do it instead of six separate addition nodes.

It's the group-wide version of the pack's plain Curve_1 + Curve_2 arithmetic, which is itself a note from the README that curves support real arithmetic - newcurve = myCurve * 2 and addition against other curves both work, performed at the union of the curves' keyframes.

Why you'd reach for it

Group-level animation. Collect your parameter curves into one group, then layer a shared motion on top: add a gentle sine to every curve in the group to make all your parameters oscillate together, or add a "fade out" ramp so everything eases toward zero at the end. Because the operation applies to the whole set, your graph stays small while the effect covers everything. If you're doing the README's prompt-interleaving (entangled curves) pattern, group operations like this are how you keep six weight curves in lockstep.

The inputs that matter

  • parameter_group - the PARAMETER_GROUP to modify, force-input.
  • curve - the KEYFRAMED_CURVE to add to every member of the group, force-input.

Output is a single PARAMETER_GROUP. Both inputs are deepcopy'd before the operation, so your original group and original curve stay untouched - the output is a new group. Chain multiple KfPGroupCurveAdd nodes to layer several offsets, or keep feeding the output back for cumulative effects.

How it works

Under the hood it's parameter_group + curve, which the keyframed library implements by mapping the addition over every curve in the group's parameters dict. Curve arithmetic happens at the union of keyframes - the result curve gets a keyframe wherever either operand had one, with interpolation filling the gaps. That's why adding a curve with a very different keyframe layout still behaves: the library rebuilds the timeline rather than just eyeballing sample points.

Installing it

Part of ComfyUI-Keyframed. ComfyUI Manager: search "Keyframed". Or:

cd ComfyUI/custom_nodes
git clone https://github.com/dmarx/ComfyUI-Keyframed

Restart ComfyUI. The pack pip-installs keyframed and toolz on first load; no model downloads.

Troubleshooting

Two things to keep an eye on. First, domain: if your offset curve only spans part of the group's time range, the addition only has meaningful effect where both curves overlap - check your curves cover the whole animation. Second, the pack's honest caveat: division is the broken operator in keyframed, so if any of the curves inside your group were built via division, the group arithmetic inherits that instability. Addition and multiplication are the reliable ones - which is presumably why this node exists and its divide sibling doesn't.

Categorykeyframed/parameter group

Inputs (2)

NameTypeDefaultDescription
parameter_groupPARAMETER_GROUP
curveKEYFRAMED_CURVE

Outputs (1)

NameTypeDescription
PARAMETER_GROUPPARAMETER_GROUP