Skip to content

Commit aa09563

Browse files
committed
Merge remote-tracking branch 'upstream/FitDiT-ComfyUI'
2 parents 4e628de + 3ff8a81 commit aa09563

5 files changed

Lines changed: 34 additions & 17 deletions

File tree

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,31 @@
3535

3636

3737
## Installation
38+
### Direct Download
3839
Download or clone the repo of [FitDiT-ComfyUI branch](https://github.com/BoyuanJiang/FitDiT/tree/FitDiT-ComfyUI) and place it in the `ComfyUI/custom_nodes/` directory, you can follow the following steps:
3940

4041
1. goto `ComfyUI/custom_nodes` dir in terminal(cmd)
4142
2. `git clone https://github.com/BoyuanJiang/FitDiT.git -b FitDiT-ComfyUI FitDiT`
4243
3. Restart ComfyUI
4344

45+
### ComfyUI-Manager
46+
You can also use [ComfyUI-Manager](https://github.com/lllyasviel/ComfyUI-Manager) to install FitDiT by searching `FitDiT[official]` in the ComfyUI-Manager.
47+
![ComfyUI-Manager](resource/img/ComfyUI-Manager.png)
48+
49+
### Environment
50+
FItDiT was tested under the following environment, but other versions should also work. You can first use your own existing environment.
51+
- torch==2.4.0
52+
- torchvision==0.19.0
53+
- accelerate==0.31.0
54+
- diffusers==0.31.0
55+
- transformers==4.39.3
56+
- numpy==1.23.0
57+
- scikit-image==0.24.0
58+
- huggingface_hub==0.26.5
59+
- onnxruntime==1.20.1
60+
- opencv-python
61+
- matplotlib==3.8.3
62+
- einops==0.7.0
4463

4564
## Download model
4665
Download the [**FitDiT model**](https://huggingface.co/BoyuanJiang/FitDiT) and place it in the `ComfyUI/models/FitDiT_models` directory, the [**clip-vit-large-patch14**](https://huggingface.co/openai/clip-vit-large-patch14) and [**CLIP-ViT-bigG-14**](https://huggingface.co/laion/CLIP-ViT-bigG-14-laion2B-39B-b160k) and place them in the `ComfyUI/models/clip` directory.
@@ -52,8 +71,7 @@ python download_model.py --dir /path/to/ComfyUI/
5271
```
5372

5473
## Example workflows
55-
[fitdit_workflow.json](fitdit_workflow.json) is the example workflow of FitDiT in ComfyUI. If you have less GPU memory, you can set `with_offload` or `with_aggressive_offload` to True.
56-
74+
[fitdit_workflow.json](fitdit_workflow.json) is the example workflow of FitDiT in ComfyUI. If you have less GPU memory, you can set `with_offload` or `with_aggressive_offload` to True. Set `with_offload` to True with **moderate gpu memroty, moderate inference time**. Set `with_aggressive_offload` to True with **lowest gpu memroty, longest inference time**.
5775
![workflow](resource/img/workflow.png)
5876

5977
## Star History

fitdit_nodes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ def load_model(self, device="cuda", with_fp16=False, with_offload=False, with_ag
7979
image_encoder_bigG=image_encoder_bigG
8080
)
8181
pipeline.to(device)
82-
if with_offload:
83-
pipeline.enable_model_cpu_offload()
84-
elif with_aggressive_offload:
82+
if with_aggressive_offload:
8583
pipeline.enable_sequential_cpu_offload()
84+
elif with_offload:
85+
pipeline.enable_model_cpu_offload()
8686
pipeline.dwprocessor = DWposeDetector(model_root=os.path.join(folder_paths.models_dir, "FitDiT_models"), device='cpu')
8787
pipeline.parsing_model = Parsing(model_root=os.path.join(folder_paths.models_dir, "FitDiT_models"), device='cpu')
8888
return (pipeline,)

requirements.txt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
torch==2.4.0
2-
torchvision==0.19.0
3-
accelerate==0.31.0
4-
diffusers==0.31.0
5-
transformers==4.39.3
6-
gradio==5.8.0
7-
numpy==1.23.0
8-
scikit-image==0.24.0
9-
huggingface_hub==0.26.5
10-
onnxruntime==1.20.1
1+
torch
2+
torchvision
3+
accelerate
4+
diffusers>=0.31.0
5+
transformers>=4.39.3
6+
numpy
7+
scikit-image
8+
huggingface_hub
9+
onnxruntime
1110
opencv-python
12-
matplotlib==3.8.3
13-
einops==0.7.0
11+
matplotlib
12+
einops

resource/img/ComfyUI-Manager.png

115 KB
Loading

resource/img/workflow.png

190 KB
Loading

0 commit comments

Comments
 (0)