Set Curve Label
The node that makes curves addressable
- curve
- KEYFRAMED_CURVE
Labels sound like cosmetics until you discover they're the address system of this whole pack. In ComfyUI-Keyframed, a parameter group stores its curves in a dict keyed by label, and the plotting nodes use labels as legend entries. So KfSetCurveLabel isn't about tidiness - it's about making a curve retrievable. Name a curve, and you can later pull it out of a group by that name, or see it identified on a plot, instead of staring at an anonymous line.
The default label is "~curve~", which is a big neon sign saying "name me something real." Every curve gets a label when it's created (the README notes one is randomly generated at init), but "randomly generated" is not "useful." This node is how you fix that.
Why you'd reach for it
Two reasons. First, before you add a curve to a parameter group: the group keys curves by their label, and KfGetCurveFromPGroup retrieves them by exact string match - so "motion" vs "Motion" are different entries, and a label you didn't set is a key you can't guess. Second, before plotting: KfDrawSchedule and KfPGroupDraw render each curve with its label in the legend, and a plot full of "~curve~" lines is useless. Name them "prompt weight" and "noise" and the plot reads like a chart instead of a Rorschach test.
The inputs that matter
curve- theKEYFRAMED_CURVEto rename, force-input.label- a string, default"~curve~". This becomes the curve's identity for groups, plots, and lookups. Make it unique within any group you plan to put it in.
Output is a single KEYFRAMED_CURVE - and here's a subtlety worth knowing: the node deepcopys the curve before relabeling it, so the original curve object isn't mutated. If you're renaming a curve that's also used elsewhere in your graph, the other copy keeps its old label. Feed the output onward, not the original.
How it works
Mechanically it's three lines of Python: copy the curve, assign curve.label = label, return the copy. All the meaning is in what labels do afterward - they're the keys in a ParameterGroup's parameters dict and the label= argument to the plot. Nothing about the curve's shape or values changes; you're just naming it.
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 models to download.
Troubleshooting
The failure mode to plan around is label mismatch: KfGetCurveFromPGroup does an exact string lookup and raises a KeyError if the label doesn't match. If you get "can't find curve" errors, check whitespace and case - a trailing space in a label is an invisible bug. And if you renamed a curve expecting the plot to update but it didn't, remember the deepcopy behavior above: you may have two labeled copies floating around, and the plot may be reading the original.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| curve | KEYFRAMED_CURVE | — | |
| label | STRING | ~curve~ | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| KEYFRAMED_CURVE | KEYFRAMED_CURVE | — |