Windows Installation Guide for UniAnimate and Animate-X in ComfyUI
This guide walks you through the step-by-step installation process for UniAnimate and Animate-X nodes in ComfyUI -Windows. Follow these instructions carefully to set everything up properly.
System Requirements (Minimum)
Operating System: Windows (Windows 10/11 recommended)
RAM: 16GB
VRAM: 12GB Nvidia Graphics Card
ComfyUI Environment (Main Requirements): These are
the libraries I have used to test the installation without issues. These
requirements are not strict. What matters is that you use libraries that are
compatible with each other)
ComfyUI GPU version
python>=3.9
Git
cuda 11.8 or 12.1
torch:
pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
xFormers = 0.0.20
Or
pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1)
xformers==0.0.27
Or
If you use another version of pytorch, make sure you use compatible versions of pytorch-cuda, torchvision, torchaudio and xformers. See
the links below to know the compatible versions.
https://pytorch.org/get-started/previous-versions/
https://github.com/facebookresearch/xformers
https://anaconda.org/xformers/xformers/files
The
custom nodes
The following are the custom nodes that will be installed.
Align & Generate poses for UniAnimate
Repose image with UniAnimate
Animate image with UniAnimate
Animate image with UniAnimate_Long
Repose image with Animate_X
Animate image with Animate_X
Animate image with Animate_X_Long
Installation
Method 1 (Use the ComfyUI Manager)
This installation via the ComfyUI manager assumes that your ComfyUI torch version is 2.3.1 and therefore attempts to install other required libraries that are compatible with this version of torch. If you have a different torch version and you want to stick to it, then it’s better you install the nodes with the second method.
The nodes can be found in this github repository: https://github.com/Isi-dev/ComfyUI-UniAnimate-W
You can visit it to know more about the project and it can also assist you with
the installation. But we will proceed with the easiest way to install the
nodes. You can use another installation of ComfyUI to avoid requirement
conflicts with other custom nodes.
Step 1:
Launch your ComfyUI application
Step 2:
Click on the "Manager" button in the main
menu and select the "Custom Nodes Manager" button
Step 3:
In the search bar, type " UniAnimate Nodes
for ComfyUI"
Step 4:
Click the "Install" button next to the node.
Sometimes the installation might fail due to an unstable
network, so keep trying until the installation succeeds.
Step 5:
Click the "Restart" button in the Custom
Nodes Manager
Step 6:
Head to your ‘ComfyUI\custom_nodes\ComfyUI-UniAnimate-W-main\’
folder and drag any of the .json files (e.g. uniAnimateReposeImg.json) into
your ComfyUI interface.
Step 7:
If any of the nodes appear red, then check your ComfyUI terminal for any error. You
can use ChatGPT to troubleshoot or visit the issues section of the above github
link to see if a similar error has been resolved. If not, you can raise an
issue or make a comment down below. You can also check the comment sections of the
following videos for replies to some of the issues raised by others:
Step 8:
If you do not get a red node, then visit this huggingface
repository: https://huggingface.co/camenduru/unianimate/tree/main
and download the five checkpoints you find there.
Also visit this huggingface repository to download the
animate-x checkpoint: https://huggingface.co/Shuaishuai0219/Animate-X/tree/main
You only need to download the animate-x_ckpt.pth
checkpoint. All other checkpoints are the same as those downloaded from the
huggingface repository first mentioned.
Place the checkpoints in your ' ComfyUI \custom_nodes\ComfyUI-UniAnimate-W-main\checkpoints'
folder.
Close your ComfyUI terminal and launch it again. You should now be able to use the nodes.
Installation
Method 2 (Use your Command Prompt)
Step 1:
Open a terminal (CMD) and navigate to the custom_nodes
directory in your ComfyUI folder:
cd ComfyUI\Custom_nodes
Step 2:
Clone the ComfyUI-UniAnimate-W repository:
git clone https://github.com/Isi-dev/ComfyUI-UniAnimate-W.git
This step might fail if your network is unstable, so keep
trying until it succeeds.
Step 3:
If using a virtual environment e.g. conda, you can now
activate it:
conda activate <your_env_name>
But if using a system or python-embedded environment, you
can proceed to the next step.
Step 4:
Navigate to the ComfyUI-UniAnimate-W-main folder in your
terminal:
cd ComfyUI-UniAnimate-W-main
Step 5:
Check your torch version with your terminal.
=>In a conda virtual environment:
conda list torch
=>In a python-embedded environment:
..\..\..\python_embeded\python.exe -c "import torch;
print(torch.__version__)"
=>If using your system environment (not recommended):
python -c "import torch; print(torch.__version__)"
I will now focus on the conda and python-embedded
environments. The difference between the python-embedded environment and your
system environment are the prefix: ..\..\..\python_embeded\python.exe & python.
Every other thing is the same.
If your torch version is 2.0.1, then you should see
something like: 2.0.1+cu118 which indicates that this pytorch version supports
cuda version 11.8. If you see something like 2.0.1+cpu, then you will need to
reinstall torch by following this guide: https://pytorch.org/get-started/previous-versions/
If you want to install torch version 2.5.0 (I have not used this
version so I don’t know if it is backwards compatible with the versions I have tried)
=>In a conda virtual environment:
conda uninstall torch torchvision torchaudio pytorch-cuda
# CUDA 11.8
conda install pytorch==2.5.0 torchvision==0.20.0
torchaudio==2.5.0 pytorch-cuda=11.8 -c
pytorch -c nvidia
# CUDA 12.1
conda install pytorch==2.5.0 torchvision==0.20.0
torchaudio==2.5.0 pytorch-cuda=12.1 -c pytorch -c nvidia
# CUDA 12.4
conda install pytorch==2.5.0 torchvision==0.20.0
torchaudio==2.5.0 pytorch-cuda=12.4 -c pytorch -c nvidia
Verify the installation:
python -c "import torch; print(torch.__version__); print(torch.cuda.is_available())"
=>In a python-embedded environment:
..\..\..\python_embedded\python.exe -m pip uninstall torch torchvision torchaudio
..\..\..\python_embedded\python.exe -m pip uninstall pytorch-cuda
# CUDA 11.8
..\..\..\python_embeded\python.exe -m pip install torch==2.5.0
torchvision==0.20.0 torchaudio==2.5.0 --index-url
https://download.pytorch.org/whl/cu118
# CUDA 12.1
..\..\..\python_embeded\python.exe -m pip install torch==2.5.0
torchvision==0.20.0 torchaudio==2.5.0 --index-url
https://download.pytorch.org/whl/cu121
# CUDA 12.4
..\..\..\python_embeded\python.exe -m pip install torch==2.5.0
torchvision==0.20.0 torchaudio==2.5.0 --index-url https://download.pytorch.org/whl/cu124
Verify the installation:
..\..\..\python_embeded\python.exe -c "import torch;
print(torch.__version__); print(torch.cuda.is_available())"
You should see e.g. 2.5.0+cul118 true.
If you see 2.5.0+cul118 false, verify if your system has a
CUDA-compatible GPU:
nvidia-smi
If this command fails, then install the appropriate NVIDIA
drivers from NVIDIA's
website
Step 6:
If your pytorch version is 2.5.0, then install xformers
version 0.0.28.post2.
=> In a conda virtual environment:
pip install xformers==0.0.28.post2
=> In a python-embedded environment:
..\..\..\python_embedded\python.exe -m pip install
xformers==0.0.28.post2
Make sure you install the xformers version compatible with
your torch version. Shown below are the pytorch versions with their compatible xformers versions based on these sites (https://github.com/facebookresearch/xformers/releases?page=1
& https://anaconda.org/xformers/xformers/files
)and on people’s experience:
torch==2.0.1 xformers ==0.0.20
torch==2.2.2 xformers == 0.0.25.post1
torch==2.3.0 xformers == 0.0.26.post1
torch==2.3.1 xformers == 0.0.27
torch==2.4.0 xformers == 0.0.27.post2
torch==2.5.0 xformers == 0.0.28.post2
torch==2.5.1 xformers == 0.0.28.post3
You can analyze the second site to know about other
compatible versions.
Step 7:
You may need to install the following libraries depending on
your environment. Some people skipped this step and were still able to use the
nodes, while some installed some of the libraries based on the errors in their
terminals:
numpy
opencv-python
pytorch_lightning
lightning_utilities
lightning_fabric
torchmetrics
einops
onnxruntime
open-clip-torch
fairscale
easydict
imageio
matplotlib
args
Step 8:
Launch your comfyUI application and open your ‘ComfyUI\custom_nodes\ComfyUI-UniAnimate-W-main\’
folder. Drag any of the .json files (e.g. uniAnimateReposeImg.json) in the
folder into your ComfyUI interface.
Step 9:
If any of the nodes appear red, then check your ComfyUI terminal
for any error. You can use ChatGPT to troubleshoot or visit the issues page of
this github repository: https://github.com/Isi-dev/ComfyUI-UniAnimate-W
to see if a similar error has been resolved. If not, you can raise an issue or make a comment down below. You can also check the comment sections of the following
videos for replies to some of the issues raised by others:
Step 10:
If you do not get a red node, then visit this huggingface
repository: https://huggingface.co/camenduru/unianimate/tree/main
and download the five checkpoints you find there.
Also visit this huggingface repository to download the
animate-x checkpoint: https://huggingface.co/Shuaishuai0219/Animate-X/tree/main
You only need to download the animate-x_ckpt.pth
checkpoint. All other checkpoints are the same as those downloaded from the
huggingface repository first mentioned.
Place the checkpoints in your ' ComfyUI \custom_nodes\ComfyUI-UniAnimate-W-main\checkpoints'
folder.
Close your ComfyUI terminal and launch it again. You should
now be able to use the nodes.
Comments
Post a Comment