IPAdapter Custom Weights | Akatz
Crossfade between two reference images through IPAdapter, on a schedule
- image
- weights
- weights_invert
- image_1
- image_2
IPAdapter Custom Weights is the node that lets you smoothly transition between two reference images feeding an IPAdapter - think style-bleed animations, a face that drifts into another face, a scene that morphs from one reference to the next - with the crossfade timed by an easing schedule instead of a hard switch.
The trick that makes it interesting: you only need two IPAdapters. Instead of loading an IPAdapter per image and switching between them (which is heavy and clicky), you set one adapter's weights to the schedule and the other's to its inverse - weights and weights_invert. As image A's weight fades from 1 to 0, image B's fades from 0 to 1, so two adapters cover any number of reference images in sequence. That's a genuinely nice pattern, and it's why the node outputs the pair of weight lists plus the two split image streams, ready to feed straight into the IPAdapter's custom-weights inputs.
How it works
You write a compact schedule string. Each entry is (weights, frame_index, transition_frames, easing), and the node parses it with a regex and interpolates per-frame weights between keyframes. Example from the docs:
((0.0, 0.0), 0), (1.0, 5, 20, linear), (0.5, 25, 10, ease_in), ((0.0, 0.0), 48, 24, ease_out)
A single float weight like 1.0 is treated as (1.0, 0.0) - weight and its inverse. timing_mode switches the frame indices between absolute frames and percentages of total frames. Omitted easing defaults to ease_in_out. The image input is the full batch of reference images; the node splits it into image_1 and image_2 (alternating), so each output pair is what the two IPAdapters should see at each step.
Inputs that matter
image- the batch of reference images to crossfade.weights- the schedule string (this is where you'll spend your time).default_weights/default_easing- fallbacks for values the schedule doesn't cover.timing_mode-FrameorPercent.frames- total output length; needed for Percent mode.
Outputs: weights and weights_invert (FLOAT lists), plus image_1 and image_2 (IMAGE).
Installing it
Part of akatz-ai/ComfyUI-AKatz-Nodes. Install via ComfyUI Manager (search "AKatz") or:
cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/ComfyUI-AKatz-Nodes
cd ComfyUI-AKatz-Nodes
pip install -r requirements.txt
Restart ComfyUI. Note this node only produces the weight and image inputs - you still need an actual IPAdapter implementation (the pack doesn't ship one), so have IPAdapter Plus or similar installed. No model downloads for this pack.
Common issues
The schedule string is strict, and the parser throws "No valid matches found in the provided weights string" on any format slip - misplaced paren, missing comma, a float like 1 instead of 1.0. Use the docs' exact format. In Percent mode you must set frames to a real value or the percentages have nothing to scale against. And remember this node is a generator, not the adapter itself: if you get an error about missing IPAdapter weights inputs, that's a separate pack you need to install, not this node misbehaving.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| weights | STRING | (1.0), | — |
| default_weights | STRING | 1.0, 0.0 | — |
| default_easing | COMBO | linear | 4 options: linear, ease_in_out, ease_in, ease_out |
| timing_mode | COMBO | Frame | 2 options: Frame, Percent |
| frames | INT | 0 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| weights | FLOAT | — |
| weights_invert | FLOAT | — |
| image_1 | IMAGE | — |
| image_2 | IMAGE | — |