Add Values Replace ππ π
Giving a numeric schedule a name so Prompt Scheduling can find it
- floats
- prev_replace
- VALUES_REPLACE
If you've clicked into this node from a workflow you downloaded, chances are you're staring at it wondering what it actually does - it has no image preview, no obvious effect, just a string box and a floats socket. That's because Add Values Replace isn't a generation node at all. It's plumbing: it takes a schedule of numbers and gives it a name, so a Prompt Scheduling node elsewhere in your graph can pull that number in per frame. This only matters if you're already doing prompt travel with AnimateDiff-Evolved - if you're not touching Prompt Scheduling, this node has nothing to offer you.
How it works
AnimateDiff-Evolved's prompt scheduling lets you write prompts that change frame by frame (classic prompt travel), but sometimes what you want to vary isn't the whole prompt, it's one number inside the prompt - say, a weight, a strength value, anything you'd normally hardcode. ValuesReplace is how you register that number as a variable. You give it a value_key (the name), hand it a floats schedule (the actual per-frame values, built with a values/keyframe node elsewhere in the pack), and the Prompt Scheduling node looks that key up by name when it assembles each frame's prompt - the exact reference syntax you use inside the prompt text is documented on the Prompt Scheduling node itself, so check that node's tooltip once you've got this one wired up.
It's a genuinely deep-cut feature. Most AnimateDiff users never touch it; the ones who do are usually doing something specific enough that a fixed prompt string won't cut it.
The inputs and outputs that matter
value_key(STRING, default empty) - the name you're registering. Make it something you'll recognize later; there's no validation stopping you from leaving it blank or duplicating one, which just means the lookup silently won't do what you expect.floats(FLOATS, required) - the actual sequence of numbers, one schedule point per frame. This comes from a separate values/keyframe-building node upstream, not from typing them here.prev_replace(VALUES_REPLACE, optional) - chains to another ValuesReplace node, the same linked-list pattern AnimateDiff-Evolved uses everywhere (motion LoRAs, keyframes, context options). This is how one prompt schedule ends up with several independently-varying keys instead of just one.
Output is VALUES_REPLACE, which plugs into the values_replace input on your Prompt Scheduling node - nowhere else.
How to install it
Through ComfyUI Manager: search for AnimateDiff Evolved, confirm the author is Kosinkadink (there are impostor packs with similar names), install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved
then restart ComfyUI. You'll also need at least one motion module - download one of the mm_sd_v1* or v3_sd15_mm checkpoints from the links in the repo and drop it in ComfyUI/models/animatediff_models (or the pack's own models folder). ValuesReplace itself doesn't need a model file; it's the motion module your Apply AnimateDiff Model node needs, and this node is downstream of that setup.
Common issues & troubleshooting
Nothing happens, and there's no error. This is the most common outcome with a pure wiring node like this one. Check three things in order: is VALUES_REPLACE actually plugged into the Prompt Scheduling node's values_replace input (easy to build the chain and forget the final connection), does your value_key exactly match what the prompt text references, and does the floats schedule actually have values in it (an empty or unconnected FLOATS input won't throw, it'll just do nothing).
The values don't line up with your frames. If your floats list is a different length than the run you're generating, you'll get either a value that stops updating partway through or an index error, depending on how the Prompt Scheduling node handles the mismatch. Match the schedule length to your actual frame count before you chase anything stranger.
You're not sure this is even the right tool. If all you want is a prompt that changes per frame - not a number substituted inside an otherwise-fixed prompt - you don't need ValuesReplace at all. Go straight to Prompt Scheduling and write per-frame text directly; this node earns its keep only when you specifically need a numeric value parameterized separately from the text around it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| value_key | STRING | β | |
| floats | FLOATS | β | |
| prev_replaceopt | VALUES_REPLACE | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| VALUES_REPLACE | VALUES_REPLACE | β |