ComfyUI Node

ID_Animator

Identity-consistent animation from a single face

By smthemex·Created 2 years ago·Updated 2 years ago· 24
ID_Animator
  • image
  • image
repo_id
promptA girl smiling,8k,best quality.
negative_promptsemi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck
scheduler
adapter_lora
adapter_lora_scale1.0
face_lora
lora_alpha0.8
steps30
seed0
cfg8.0
height512
width512
video_length16
scale0.8

ID_Animator is the whole point of this pack: feed it one clean photo of a face and it generates a video where that specific person is the subject - no LoRA training, no API, no key. It's a ComfyUI port of the ID-Animator research project (USTC), and mechanically it stacks two things you may already know separately: the identity-injection trick from the IP-Adapter FaceID / InstantID family, and an AnimateDiff motion module underneath. If you've ever wanted a character who stays recognizable while moving, this is one node doing the whole job in a single pass.

Straight talk before the hype: this is a 2023-era SD 1.5 pipeline. AnimateDiff has been superseded for general video work, and the SD 1.5 base puts a real ceiling on how good the output can look. You reach for this node when the specific thing you want is a known face in motion, not when you want the best possible video. The identity-preservation half is what keeps the niche alive - training-free character consistency is still genuinely useful.

How it works

Every run is a small assembly line:

  1. InsightFace's buffalo_l model (auto-downloaded to ~/.insightface/models on first run) detects the face, aligns it, and crops it to a normalized 112x112.
  2. The crop is resized to 224 and passed through a CLIP image encoder in models/image_encoder.
  3. ID-Animator's face adapter turns that into 16 identity tokens injected into the UNet's cross-attention - the same family of trick as IP-Adapter FaceID, minus the training.
  4. The AnimateDiff UNet3D, loaded with a motion module (mm_sd_v15_v2) and the v3 domain-adapter LoRA, animates the frames.
  5. It returns every frame as one IMAGE tensor.

So the prompt directs what the character does, the photo decides who it is, and the motion module supplies the movement. Everything runs in fp16 on CUDA.

The inputs that matter

image is your face reference: one person, decent lighting, facing the camera. prompt and negative_prompt do the directing - the defaults are workable but bland. repo_id is a force-input STRING you wire in from ID_Repo_Choice (or feed from any string node); it carries the diffusers repo, the dreambooth checkpoint, and the motion module in one comma-joined value. scale (default 0.8) is your identity-strength dial - too low and the face drifts toward generic, too high and it looks pasted on. video_length (default 16, max 32) is the frame count; the README notes the frame-rate cap was fixed at 32. steps, cfg, seed, height, width are the usual suspects.

The scheduler dropdown and the LoRA slots are the tuning layer: adapter_lora set to "none" auto-downloads the v3_sd15_adapter.ckpt domain adapter from guoyww/animatediff, and face_lora pulls from your normal loras folder (with lora_alpha for strength). Output is a single image - the frame stack - which is exactly what a video node wants.

Install and models

ComfyUI-Manager (search "ComfyUI_ID_Animator") or the old faithful:

cd ComfyUI/custom_nodes
git clone https://github.com/smthemex/ComfyUI_ID_Animator.git

Then restart. Here's the part that trips everyone: the shipped requirements.txt pins torch==2.2.0, xformers==0.0.24, transformers==4.31.0, insightface==0.7.3 - old pins that will fight a modern ComfyUI. Do not let Manager run that whole file over your install. Install the missing modules individually (the repo has an "if miss module check this requirements.txt" list): insightface, onnxruntime, einops, imageio/imageio-ffmpeg, omegaconf, and diffusers (0.28+ works).

Model files, relative to the pack's own models/ dir unless noted:

  • animator.ckptmodels/
  • mm_sd_v15_v2.ckptmodels/animatediff_models/ (auto-fetched if you leave the dropdown on "none")
  • v3_sd15_adapter.ckptmodels/adapter/ (auto-fetched with adapter_lora = "none")
  • SD 1.5 diffusers folder → ComfyUI/models/diffusers (runwayml/stable-diffusion-v1-5)
  • CLIP image encoder → models/image_encoder
  • an optional dreambooth-style checkpoint (realisticVision etc.) → ComfyUI/models/checkpoints

Gotchas

  • The first run downloads buffalo_l to ~/.insightface/models; give it a minute before you assume it's hung.
  • VRAM: UNet3D + motion module + face adapter + InsightFace all resident in fp16 means 12GB is comfortable, 8GB is tight, and there is no Apple-silicon path (hard-coded CUDA).
  • If your output barely moves, you've probably left video_length at 1–2 frames; keep it in the 12–32 range and scale between 0.6 and 1.0.
  • The wrapper is Apache-2.0. The README is upfront that the upstream research repo never set a license, so treat that as "fine to tinker," not legal advice.
CategoryID_Animator

Inputs (16)

NameTypeDefaultDescription
imageIMAGE
repo_idSTRING
promptSTRINGA girl smiling,8k,best quality.
negative_promptSTRINGsemi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck
schedulerCOMBO18 options: DDIM, DDPM, DPM++ 2M, DPM++ 2M Karras, DPM++ 2M SDE, DPM++ 2M SDE Karras, +12
adapter_loraCOMBO2 options: none, put adapter file here
adapter_lora_scaleFLOAT1.00.1–20
face_loraCOMBO0 options:
lora_alphaFLOAT0.80.1–20
stepsINT301–2048
seedINT00–18446744073709550000
cfgFLOAT8.00–100
heightINT51264–8192
widthINT51264–8192
video_lengthINT161–32
scaleFLOAT0.80.1–10

Outputs (1)

NameTypeDescription
imageIMAGE