Weight Schedule Convert(WeightScheduleConvert)
This node can automatically detect the type of input data and perform corresponding conversions based on the output type selected by the user.
Weight Schedule Convert
The Weight Schedule Convert node automatically detects the type of input data and performs corresponding conversions based on the user-selected output type.
The Weight Schedule Convert node is a data format conversion tool. Its core function is to convert input weights or numerical sequences between different formats, such as lists, Pandas Series, or PyTorch tensors. It is designed to simplify the data format requirements of different nodes within a workflow, ensuring compatibility in the data flow.
Node Functionality
This node can automatically detect the type of input data and perform corresponding conversions based on the user-selected output type. It supports processing data in list, Pandas Series, and PyTorch Tensor formats. It also provides auxiliary functions such as numerical remapping, sequence inversion, and repetition to accommodate more complex processing needs.
Node Parameter Description - Weight Schedule Convert
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
output_type | COMBO | Yes | match_input | "match_input", "list", "pandas series", "tensor... | The target output format. Options are "list", "pandas series", or "tensor". The default is "match_input". |
input_values | FLOAT | Yes | 0.0 | - | The input weight or numerical sequence. Supports list, Pandas Series, or PyTorch Tensor format. |
invert | BOOLEAN | Yes | False | - | invert (Input Parameter): A boolean switch. If enabled, the order of the input numerical sequence is reversed. |
repeat | INT | Yes | 1 | 1 - 255 (Step: 1) | repeat (Input Parameter): Sets the number of times to repeat the input sequence. The value range is 1 to 255, with a step of 1. |
remap_to_frames | INT | No | 0 | - | - |
interpolation_curve | FLOAT | No | - | - | interpolation_curve (Input Parameter): An optional sequence of floating-point numbers used to define an interpolation curve, adjusting the transition of values when remapping to frames. |
remap_values | BOOLEAN | No | False | - | - |
remap_min | FLOAT | No | 0.0 | -100000 - 100000.0 (Step: 0.01) | - |
remap_max | FLOAT | No | 1.0 | -100000 - 100000.0 (Step: 0.01) | - |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| FLOAT | FLOAT | FLOAT (Output Parameter): Outputs the converted sequence of floating-point numbers. |
| STRING | STRING | STRING (Output Parameter): Outputs the converted numerical sequence as a string, facilitating viewing or logging. |
| INT | INT | INT (Output Parameter): Outputs the converted sequence of integers (typically obtained by rounding floating-point numbers). |
Usage Scenarios
In animation or video generation workflows, this node can be used to convert a list of weights describing style intensity changes into the specific format required by other nodes (e.g., a LoRA scheduler). After obtaining a string of numerical values from a text or curve editor, you can use this node to ensure these values are correctly recognized and processed by downstream nodes.
Notes
Please note that this node primarily performs format conversion and basic numerical adjustments. Complex mathematical operations or interpolation may require combining it with other specialized nodes.
Weight Schedule Convert Node Source Code Link
The Weight Schedule Convert node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.