ComfyUI > Nodes > ComfyUI-Keyframed > Curve_1 / Curve_2

ComfyUI Node: Curve_1 / Curve_2

Class Name

KfCurvesDivide

Category
keyframed
Author
dmarx (Account age: 4505days)
Extension
ComfyUI-Keyframed
Latest Updated
2024-05-22
Github Stars
0.08K

How to Install ComfyUI-Keyframed

Install this extension via the ComfyUI Manager by searching for ComfyUI-Keyframed
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Keyframed in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Curve_1 / Curve_2 Description

Perform element-wise division of keyframed curves for creating new ratio curve in animation tasks.

Curve_1 / Curve_2:

The KfCurvesDivide node is designed to perform element-wise division of two keyframed curves. This node is particularly useful when you need to create a new curve that represents the ratio of two existing curves over time. By dividing one curve by another, you can achieve effects such as normalization or modulation, which can be essential in various animation and procedural generation tasks. This node ensures that the division operation is applied consistently across all keyframes, providing a smooth and continuous result.

Curve_1 / Curve_2 Input Parameters:

curve_1

curve_1 is the first keyframed curve that will be used as the numerator in the division operation. This parameter is required and must be of type KEYFRAMED_CURVE. The values of this curve will be divided by the corresponding values of curve_2 at each keyframe. Ensure that this curve is properly defined and contains the keyframes you wish to use in the division.

curve_2

curve_2 is the second keyframed curve that will be used as the denominator in the division operation. This parameter is required and must be of type KEYFRAMED_CURVE. The values of this curve will be used to divide the corresponding values of curve_1 at each keyframe. It is important to ensure that this curve does not contain zero values to avoid division by zero errors.

Curve_1 / Curve_2 Output Parameters:

KEYFRAMED_CURVE

The output is a new keyframed curve that represents the result of the division of curve_1 by curve_2. This curve will have the same keyframes as the input curves, with each keyframe value being the result of the division operation. This output can be used in further processing or directly in your animation or procedural generation tasks.

Curve_1 / Curve_2 Usage Tips:

  • Ensure that both input curves (curve_1 and curve_2) are well-defined and contain the same number of keyframes to avoid inconsistencies in the output.
  • Avoid using curves with zero values in curve_2 to prevent division by zero errors, which can result in undefined or infinite values in the output curve.
  • Use this node to normalize a curve by dividing it by a constant-valued curve created using the KfCurveConstant node.

Curve_1 / Curve_2 Common Errors and Solutions:

Division by zero error

  • Explanation: This error occurs when curve_2 contains one or more keyframes with a value of zero, leading to an undefined division operation.
  • Solution: Ensure that curve_2 does not contain any zero values. You can preprocess the curve to replace zero values with a small non-zero value if necessary.

Mismatched keyframes error

  • Explanation: This error occurs when curve_1 and curve_2 do not have the same number of keyframes, leading to inconsistencies in the division operation.
  • Solution: Verify that both input curves have the same number of keyframes and that they are aligned correctly. Adjust the keyframes if necessary to ensure they match.

Curve_1 / Curve_2 Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Keyframed
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.