Nodes/ComfyCollectorNodes/Curve To Core (CCN)
ComfyUI Node

Curve To Core (CCN)

Hand a drawn CCN curve to ComfyUI's native curve consumers

By valkymaera·Created 4 months ago·Updated 10 days ago· 1
Curve To Core (CCN)
  • curve
  • core_curve
samples17
interpolationmonotone_cubic
curve_data[{"x":0,"y":0,"in":0,"out":1,"mirrored":true},{"x":1,"y":1,"in":1,"out":0,"mirrored":true}]
debugfalse

Curve To Core (CCN) is the other half of the interoperability bridge: it converts a CCN_CURVE - the Hermite-keyframe curves this pack draws - into ComfyUI's native CURVE format, so a curve you shaped in the pack's editor can feed a native curve consumer. Where Curve From Core imports native curves into CCN, this exports them back out.

How it works

The formats are genuinely different, and the source is honest about the mismatch. Core's format derives tangents from points rather than storing them, so arbitrary Hermite tangents can't be carried over exactly. The converter handles it by sampling the CCN curve: it takes the samples count (default 17, range 2–1025), samples uniformly across 0–1, and - the key detail - always includes the key positions in the sample set, so key values are preserved exactly. Deviation between samples shrinks as samples rises. The interpolation choice (monotone_cubic or linear) sets the mode of the emitted core curve.

There's a real trade-off baked into samples, and the tooltip spells it out: higher counts are more faithful, lower counts stay editable if you feed the result back into a native curve editor. A 17-point curve is a reasonable balance - faithful enough to hold the shape, editable enough to nudge in core's editor afterward. The optional curve input overrides the built-in curve_data editor when connected, and debug prints conversion details.

Inputs and outputs

samples, interpolation, curve_data (the built-in editor), the optional curve, and optional debug. Output is core_curve, a native CURVE. When comfy_api has curve support, it emits a CurveInput instance matching core's own convention (the CurveEditor node outputs instances too), so the result plugs straight into native nodes.

Install

ComfyUI Manager → search ComfyCollectorNodes → Install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/valkymaera/ComfyCollectorNodes

Restart, no pip step. Under the (CCN) suffix.

Why bother

If you've built a curve in the CCN editor - or a whole schedule with Curve Definition feeding Curve Sample - and you want to hand that shape to a node that only speaks native CURVE, this is the translator. It's the inverse of Curve From Core, and together they mean you never have to commit to one curve ecosystem. The practical advice: don't crank samples to 1025 on a workflow you'll keep editing; you lose editability for fidelity you can't see. Keep it at the default until you know you need sharper, and remember that key positions are always exact - so a step-shaped or point-anchored curve stays honest regardless of sample count.

CategoryCCN

Inputs (5)

NameTypeDefaultDescription
samplesINT172–1025Uniform sample count across 0..1 (key positions are added on top). Higher is more faithful; lower stays editable if the result is fed into a native curve editor.
interpolationCOMBOmonotone_cubicInterpolation mode of the emitted core curve.
curve_dataSTRING[{"x":0,"y":0,"in":0,"out":1,"mirrored":true},{"x":1,"y":1,"in":1,"out":0,"mirrored":true}]
curveoptCCN_CURVEOverrides curve_data when connected.
debugoptBOOLEANfalsePrint conversion details to console.

Outputs (1)

NameTypeDescription
core_curveCURVE