Nodes/ComfyUI_IPAdapter_plus/IPAdapter Weights From Strategy
ComfyUI Node Runs on cloud

IPAdapter Weights From Strategy

Reuse one fade timeline everywhere

By cubiq·Created 3 years ago·Updated about a year ago· 6,086
IPAdapter Weights From Strategy
  • weights_strategy
  • image
  • weights
  • weights_invert
  • total_frames
  • image_1
  • image_2
  • weights_strategy

This is the DRY version of IPAdapter Weights. The regular Weights node takes a pile of settings - frame count, timing curve, keyframes - and computes a per-frame weight schedule. Weights From Strategy skips all that input and instead takes a ready-made WEIGHTS_STRATEGY object and expands it into the same set of outputs. In other words: you define the timeline once, bundle it as a strategy, and then reuse that exact strategy in as many places as you need without re-typing the settings each time.

Where this matters is a workflow with several nodes that all have to agree on the same animation timeline. Maybe the image fade, the prompt schedule, and some other scheduled parameter all need to march to the identical beat. Rather than configuring the frame count and curve three times (and inevitably getting one of them slightly wrong), you build the strategy once and feed it everywhere. Weights From Strategy is how you turn that shared strategy back into concrete weights and image streams at each use site.

How it works

It reads the WEIGHTS_STRATEGY - which already encodes the frame count, transition timing, and curve - and produces the same outputs the full Weights node does: the per-frame weight lists, the frame total, and the split reference image streams. No re-computation of settings, just expansion of the bundled plan.

The inputs and outputs

  • weights_strategy - the strategy bundle, produced upstream by IPAdapter Weights (its weights_strategy output) or another strategy source. This is the single required input.
  • image (optional) - a reference image batch to split, if this use site needs the two reference streams.
  • Outputs - weights and weights_invert (the per-frame float lists and their mirror), total_frames (the count), image_1 and image_2 (the split reference streams), and weights_strategy (the strategy passed through, so you can daisy-chain it onward).

In practice weights feeds the weight input of an IPAdapter Batch apply node, and the strategy output lets you keep threading the same timeline into further nodes.

Installing the pack

ComfyUI Manager: search ComfyUI IPAdapter plus, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus

then restart, keeping ComfyUI current. This node is pure math - no model files needed here. The apply nodes it feeds want the CLIP vision encoders in ComfyUI/models/clip_vision and adapters in ComfyUI/models/ipadapter.

Where people get burned

The obvious one: you need a WEIGHTS_STRATEGY to feed it. This node produces nothing from scratch - if you don't have a strategy wired in, there's nothing to expand. Build one with IPAdapter Weights first (it emits a weights_strategy), then route that here. People sometimes reach for this node expecting it to be the standalone weight generator; that's the regular IPAdapter Weights node, which takes raw settings.

The recurring animation trap applies here too: the frame count encoded in the strategy has to match the number of latents your sampler actually generates. If the strategy says 60 and your batch is 48, the fade lands wrong or throws a length error - keep the counts aligned across every node that touches the timeline. And the standing caveat: this pack is SD 1.5 / SDXL only, in maintenance mode, so the animation stack it plugs into is the SD-era AnimateDiff one.

Categoryipadapter/weights

Inputs (2)

NameTypeDefaultDescription
weights_strategyWEIGHTS_STRATEGY
imageoptIMAGE

Outputs (6)

NameTypeDescription
weightsFLOAT
weights_invertFLOAT
total_framesINT
image_1IMAGE
image_2IMAGE
weights_strategyWEIGHTS_STRATEGY