AnimateDiff-PIA Keyframe ππ π
Scheduling image-conditioned motion in Gen2
- prev_ad_keyframes
- scale_multival
- effect_multival
- pia_input
- AD_KEYFRAMES
PIA - Personalized Image Animator - is AnimateDiff-Evolved's image-to-video path: instead of just generating motion from a text prompt, you give it a starting image and a dedicated PIA motion model conditions on that image at a controllable strength. This node is the scheduling piece: it lets that image-conditioning strength, along with the usual motion scale/effect, change over the course of the generation instead of staying fixed.
What it does
AnimateDiff Keyframes generally let you vary scale (how much motion applies) and effect (how much the motion model influences the result at all) at different points in the sampling process, chained together via start_percent markers. This node is the PIA-specific flavor of that, with one extra field: pia_input, which carries how strongly the input image conditions each frame. The README describes two ways to set it - through the paper's own presets (PIA Input [Paper Presets]) or by hand (PIA Input [Multival]) - and this keyframe node is what lets that value itself be scheduled rather than constant.
inherit_missing (default on) means a keyframe that doesn't specify a value for one of the multivals inherits it from the previous keyframe in the chain, rather than resetting to a default - handy when you only want to change one thing at a given point without re-specifying everything. guarantee_steps makes sure a keyframe holds for at least that many steps once it's reached, so a very close start_percent on the next keyframe doesn't skip it entirely.
Inputs and output
start_percent- where in the sampling process (0β1) this keyframe takes effect.prev_ad_keyframes(optional) - chains onto an existingAD_KEYFRAMESsequence to build up a full schedule.scale_multival,effect_multival(optional, MULTIVAL) - the standard AnimateDiff motion controls, schedulable here.pia_input(optional, PIA_INPUT) - how strongly the source image conditions this segment.inherit_missing(default true) - unset values carry over from the previous keyframe rather than resetting.guarantee_steps(default 1) - minimum steps this keyframe holds before the next one can take over.
Output is AD_KEYFRAMES, feeding the Apply AnimateDiff-PIA Model Gen2 node's keyframe input.
How to install it
Ships with the base pack, but PIA needs its own model file the README calls out separately.
- ComfyUI Manager - search AnimateDiff Evolved by Kosinkadink, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved, restart. - Model - download
pia.ckptfrom Leoxing/PIA on HuggingFace and place it inComfyUI/models/animatediff_models(or the pack's ownmodelsfolder). - beta_schedule - the README is specific here: use
autoselectorsqrt_linear (AnimateDiff). Anything else and PIA won't behave as intended. - You need the Apply AnimateDiff-PIA Model Gen2 node in your graph for
pia_inputto have any effect at all - this keyframe node alone doesn't apply PIA, it only schedules values that a PIA-aware application node reads.
Common issues & troubleshooting
PIA is a genuinely obscure corner of this pack. Community discussion of it is thin - it's easy to find guides for basic AnimateDiff and hard to find much on PIA specifics. Expect to lean on the README and your own testing more than a well-worn tutorial trail.
Nothing image-related seems to be happening. Confirm you're using the Apply AnimateDiff-PIA Model Gen2 node (not the plain AnimateDiff model application node) - PIA's whole point is image conditioning, and the plain application path has nowhere to plug that in.
Output looks wrong regardless of scheduling. Check beta_schedule first. Per the README, PIA specifically wants sqrt_linear (AnimateDiff) - using the default schedule for a different model family is the most common invisible mismatch in this workflow.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| start_percent | FLOAT | 0.0000β1 | β |
| prev_ad_keyframesopt | AD_KEYFRAMES | β | |
| scale_multivalopt | MULTIVAL | β | |
| effect_multivalopt | MULTIVAL | β | |
| pia_inputopt | PIA_INPUT | β | |
| inherit_missingopt | BOOLEAN | true | β |
| guarantee_stepsopt | INT | 10β9007199254740991 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AD_KEYFRAMES | AD_KEYFRAMES | β |