IPAdapter Weights(IPAdapterWeights)
IPAdapter Weights node from ComfyUI-IPAdapter-plus.
IP Adapter Weights
Description
IPAdapter Weights builds a per-frame weighting schedule for IPAdapter application. It turns a short list of weight values plus a timing curve into a sequence of weights that can change across a batch of frames, then packages that sequence as a WEIGHTS_STRATEGY output for the IPAdapter apply node in the same package. It also exposes the generated scalar values and image data directly as outputs.
This node is most useful in video or batch workflows where IPAdapter influence should ramp up, ramp down, pulse, or otherwise vary over time instead of staying constant. It lives in the ipadapter/weights category.
Inputs
weights
- Type: STRING
- Default:
"1.0, 0.0"
A comma-separated list of weight values. When timing is set to custom, these values define the schedule directly. With one of the interpolation modes, they act as the key values that the timing curve interpolates between. Values are parsed as floating point numbers.
timing
- Type: COMBO
- Default:
linear - Options:
custom,linear,ease_in_out,ease_in,ease_out,random
Selects how the weight sequence is generated:
custom: use theweightslist as supplied, without interpolation.linear: straight-line interpolation between the supplied weight values.ease_in_out: smooth acceleration at the start and deceleration at the end.ease_in: gradual start, faster finish.ease_out: fast start, gradual finish.random: generate randomized weights across the frames.
frames
- Type: INT
- Default:
0 - Range: 0 to 9999, step 1
Number of frames over which the schedule is generated. Increasing this value stretches the schedule over a longer sequence. A value of 0 leaves the length to be derived from the surrounding context or from the supplied weight list.
start_frame
- Type: INT
- Default:
0 - Range: 0 to 9999, step 1
The first frame of the schedule that should receive varying weights. Frames before this index are outside the active range.
end_frame
- Type: INT
- Default:
9999 - Range: 0 to 9999, step 1
The last frame of the schedule that should receive varying weights. The default of 9999 effectively covers the whole schedule unless you lower it. Use start_frame and end_frame together to restrict the animation to a subrange.
add_starting_frames
- Type: INT
- Default:
0 - Range: 0 to 9999, step 1
Adds this many frames before the active range, holding the starting weight constant. Useful for a short lead-in before an animation begins.
add_ending_frames
- Type: INT
- Default:
0 - Range: 0 to 9999, step 1
Adds this many frames after the active range, holding the ending weight constant. Useful for a hold or tail after an animation finishes.
method
- Type: COMBO
- Default:
full batch - Options:
full batch,shift batches,alternate batches
Controls how the generated schedule is mapped onto batches:
full batch: apply the schedule across the whole batch in a single pass.shift batches: offset the schedule per batch so successive batches continue or advance through the animation.alternate batches: apply the schedule in an alternating pattern across batches.
This setting matters most when the node is used with multi-batch or video workflows.
image
- Type: IMAGE
- Required: No
An optional image batch input. When connected, the incoming image data is available to the node and can be passed through to the image outputs. Leave it unconnected when you only need to build a weight schedule.
Outputs
The node returns six outputs:
- FLOAT: a scalar value produced by the schedule, suitable for driving other numeric inputs.
- FLOAT: a second scalar value from the schedule.
- INT: an integer value, typically a frame count associated with the generated schedule.
- IMAGE: an image batch output.
- IMAGE: a second image batch output.
- WEIGHTS_STRATEGY: the packed weight schedule. This is the primary output to connect to the weights input of an IPAdapter apply node.
The scalar and image outputs expose intermediate or pass-through data; the WEIGHTS_STRATEGY output is the one that carries the full schedule to the apply node.
Usage Notes
- Connect the
WEIGHTS_STRATEGYoutput to the weights input of a compatible IPAdapter apply node. The apply node interprets the schedule and applies the varying weights during sampling. - Use
customtiming when you want exact control over the weight list, and the easing orrandommodes when you want the node to generate the in-between values for you. - For animation work, set
framesto match the length of the target sequence, then usestart_frameandend_frameto confine the change to a portion of it. - Use
add_starting_framesandadd_ending_framesto add constant-weight padding around an animated section, which is helpful for clean fades and holds. - The
methodsetting determines whether every batch sees the same schedule or whether the schedule shifts or alternates between batches. Chooseshift batcheswhen successive batches should continue the animation rather than restart it. randomtiming is useful for experimentation and for effects where the weight should vary unpredictably across frames.
Comments
Sign in with GitHub to join the discussion.