Nodes/ComfyUI-Keyframed/Parameter Group * Curve (multiply)
ComfyUI Node

Parameter Group * Curve (multiply)

Scaling a whole set of parameters at once

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

Multiplication is the operator that actually shapes an animation. Addition nudges; multiplication scales, and scaling is how you make a whole parameter set breathe together. KfPGroupCurveMultiply takes a parameter group and a curve, and returns a new group where every member curve has been multiplied by that curve - so one "envelope" curve can compress or expand all six of your animated values in perfect sync. It's the multiplier twin of KfPGroupCurveAdd, and it's the one you'll reach for when you want everything to swell at the same moment.

Think of the input curve as a master volume fader. Values below 1 duck your parameters, values above 1 push them past their normal range, and if the curve oscillates, all your curves oscillate in lockstep. It's group-wide curve arithmetic, which the pack's README tells you is real: curves support multiplication against other curves and against plain numbers, evaluated at the union of keyframes.

Why you'd reach for it

Master envelopes. Collect your parameter curves into a group, then multiply by a "pulse" curve so every parameter peaks mid-animation and relaxes at the ends - a classic effect for looping content, where you want the whole system to swell and settle with the loop. Or use a ramp that starts at 0 and climbs to 1 as a fade-in for every parameter at once. If you're driving the entangled-curves prompt-interleaving pattern from the README, group multiplication is how you'd apply a global emphasis over the top of all six weight curves.

The inputs that matter

  • parameter_group - the PARAMETER_GROUP to scale, force-input.
  • curve - the KEYFRAMED_CURVE to multiply every member by, force-input.

Output is a single PARAMETER_GROUP. Both inputs get deepcopy'd first, so the output is a new group and your originals stay intact - chain the output back through another multiply to stack envelopes.

How it works

Under the hood it's parameter_group * curve, mapped by the keyframed library over every curve in the group's parameters dict. As with all curve arithmetic here, the multiplication is performed at the union of keyframes: the result timeline includes a keyframe wherever either operand had one, with the interpolation method of the relevant keyframe filling between. That's why a multiply with a sparse envelope still behaves correctly across your whole animation.

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

Watch your envelope's range like a hawk. Multiplying by a curve that swings above 1 can shove a parameter (CFG, prompt weight) out of a sane range mid-animation, and the pack won't warn you - it'll just happily hand the sampler a CFG of 14. Check the product with KfPGroupDraw before committing to a long render. And the standing caveat: division is the broken operator in keyframed, so if any member curve was built with a divide, group arithmetic inherits the wobble. Multiplication itself is solid.

Categorykeyframed/parameter group

Inputs (2)

NameTypeDefaultDescription
parameter_groupPARAMETER_GROUP
curveKEYFRAMED_CURVE

Outputs (1)

NameTypeDescription
PARAMETER_GROUPPARAMETER_GROUP