RedbeardNZ vuongminhkhoi4 commited on
Commit
0b3246a
ยท
verified ยท
0 Parent(s):

Duplicate from vuongminhkhoi4/ComfyUI_InfiniteYou

Browse files

Co-authored-by: Vuong <[email protected]>

.gitattributes ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ face_combine_workflow.png filter=lfs diff=lfs merge=lfs -text
37
+ musk.png filter=lfs diff=lfs merge=lfs -text
38
+ teaser.jpg filter=lfs diff=lfs merge=lfs -text
39
+ workflow_example.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+
5
+
6
+ # ๐Ÿš€ ComfyUI_InfiniteYou
7
+ An implementation of **InfiniteYou** for **ComfyUI**
8
+
9
+ Native support for [InfiniteYou](https://github.com/bytedance/InfiniteYou) in [ComfyUI](https://github.com/comfyanonymous/ComfyUI), designed by the ZenAI team.
10
+
11
+
12
+ **โœจ Support further development by starring the project! โœจ**
13
+
14
+
15
+ ![teaser](./teaser.jpg)
16
+
17
+ ---
18
+
19
+ ## ๐Ÿ”ฅ News
20
+ - **[03/2025]** ๐Ÿ”ฅ Integrate Face Combine feature to predict future children
21
+ - **[03/2025]** ๐Ÿ”ฅ Code updated and released as the first version.
22
+
23
+ ---
24
+
25
+ ## ๐Ÿ“œ Introduction
26
+
27
+ ๐Ÿš€ **InfiniteYou** is a **SOTA zero-shot identity preservation** model by **ByteDance**, built on **FLUX**. This repo brings it to **ComfyUI**, powered by **ZenAI**.
28
+
29
+ ๐Ÿ”— **References:**
30
+ ๐Ÿ“„ [Paper](https://arxiv.org/abs/2503.16418) | ๐Ÿ’พ [Official Repo](https://github.com/bytedance/InfiniteYou)
31
+
32
+ ๐Ÿ’ก Inspired by **ZenID** ๐Ÿ”— [ZenID Repo](https://github.com/vuongminh1907/ComfyUI_ZenID)
33
+
34
+ ๐Ÿ”ฅ Stay tuned for updates!
35
+
36
+ ---
37
+
38
+ ## ๐Ÿ† Model Zoo
39
+
40
+ The main author has released two versions of the model, each tailored for a specific purpose:
41
+
42
+ - ๐Ÿ”น **sim_stage1** โ€“ Prioritizes **higher identity similarity** for more accurate face preservation.
43
+ - ๐ŸŽจ **aes_stage2** โ€“ Focuses on **better text-image alignment** and enhanced **aesthetics**.
44
+
45
+ To ensure seamless integration with **ComfyUI**, we have converted the model to the **safetensors** format.
46
+
47
+
48
+ **Download the model on Hugging Face:**
49
+ ๐Ÿ‘‰ [ComfyUI_InfiniteYou](https://huggingface.co/vuongminhkhoi4/ComfyUI_InfiniteYou)
50
+ ---
51
+
52
+ ## ๐Ÿ› ๏ธ Workflow
53
+ ### **Zero-Shot Task**
54
+ ![Musk](./musk.png)
55
+
56
+ ### **FaceCombine Task**
57
+ ![Children](./face_combine_workflow.png)
58
+ ---
59
+
60
+ ## ๐Ÿ“ฆ Installation
61
+
62
+ ### Step 1: Clone the Repo
63
+ ```bash
64
+ cd custom_nodes
65
+ git clone https://github.com/ZenAI-Comfy/ComfyUI_InfiniteYou
66
+ ```
67
+ ### Step 2: Install Requirements
68
+ ```bash
69
+ cd ComfyUI_InfiniteYou
70
+ pip install -r requirements.txt
71
+ ```
72
+
73
+ ### Step 3: Download ControlNet Models
74
+ ```bash
75
+ cd ../../models/controlnet
76
+ wget https://huggingface.co/vuongminhkhoi4/ComfyUI_InfiniteYou/resolve/main/aes_stage2_control_net/aes_stage2_control.safetensors
77
+ wget https://huggingface.co/vuongminhkhoi4/ComfyUI_InfiniteYou/resolve/main/sim_stage1_control_net/sim_stage1_control_net.safetensors
78
+ cd ..
79
+ ```
80
+ ### Step 4: Download Image Projection Files
81
+ ```bash
82
+ mkdir InfiniteYou
83
+ cd InfiniteYou
84
+ wget https://huggingface.co/vuongminhkhoi4/ComfyUI_InfiniteYou/resolve/main/aes_stage2_control_net/aes_stage2_img_proj.bin
85
+ wget https://huggingface.co/vuongminhkhoi4/ComfyUI_InfiniteYou/resolve/main/sim_stage1_control_net/sim_stage1_img_proj.bin
86
+ cd ../..
87
+ ```
88
+ ### Step 5: Download InsightFace model
89
+ The InsightFace model is **antelopev2** (not the classic buffalo_l). Download the models (for example from [here](https://drive.google.com/file/d/18wEUfMNohBJ4K3Ly5wpTejPfDzp-8fI8/view?usp=sharing) or [here](https://huggingface.co/MonsterMMORPG/tools/tree/main)), unzip and place them in the `ComfyUI/models/insightface/models/antelopev2` directory.
90
+
91
+ Alternatively, you can quickly download all **models** using the following command:
92
+ ```
93
+ # make sure you are in the ComfyUI directory
94
+ cd custom_nodes/
95
+ git clone https://github.com/ZenAI-Vietnam/ComfyUI_InfiniteYou
96
+ python ComfyUI_InfiniteYou/downloadmodel.py
97
+ pip install -r ComfyUI_InfiniteYou/requirements.txt
98
+ ```
99
+
100
+ ## ๐Ÿงญ Usage
101
+
102
+ ๐Ÿ”น For `aes_stage2`: Try file `aes_stages2.json` in `workflows`
103
+
104
+ ๐Ÿ”น For `sim_stage1`: Try file `sim_stages1.json` in `workflows`
105
+
106
+ Predict your future children
107
+ ๐Ÿ”น For `Face Combine`: Try file `face_combine.json` in `workflows`
108
+
109
+
110
+
111
+ ## ๐Ÿ“ž Contact for Work ๐ŸŒŸ
112
+ This implementation of InfiniteYou is brought to you by the ZenAI Team.
113
+
114
+ <img src="https://huggingface.co/vuongminhkhoi4/ComfyUI_InfiniteYou/blob/main/zenai.png" width="400" />
115
+
116
+ If you need more polished and enhanced version, please contact us through:
117
+ - ๐Ÿ“ฑ **Facebook Page**: [ZenAI](https://web.facebook.com/zenai.vn)
118
+ - โ˜Ž๏ธ **Phone**: 0971912713 Miss. Chi
119
+
120
+ ## ๐Ÿ“– Citation
121
+
122
+ ```bibtex
123
+ @article{jiang2025infiniteyou,
124
+ title={{InfiniteYou}: Flexible Photo Recrafting While Preserving Your Identity},
125
+ author={Jiang, Liming and Yan, Qing and Jia, Yumin and Liu, Zichuan and Kang, Hao and Lu, Xin},
126
+ journal={arXiv preprint},
127
+ volume={arXiv:2503.16418},
128
+ year={2025}
129
+ }
130
+ ```
aes_stage2_control_net/aes_stage2_control.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62ec6e658775747ae2eea8abec8af30eb92b74a57ce0a7087693d3381626e727
3
+ size 5905345320
aes_stage2_control_net/aes_stage2_img_proj.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f85518431d7367de30b9558a939c003462a7e331e8c8b929146916dc27e471d6
3
+ size 338413026
aes_stage2_control_net/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "FluxControlNetModel",
3
+ "_diffusers_version": "0.31.0",
4
+ "_infu_flux_version": "1.0",
5
+ "attention_head_dim": 128,
6
+ "axes_dims_rope": [
7
+ 16,
8
+ 56,
9
+ 56
10
+ ],
11
+ "conditioning_embedding_channels": null,
12
+ "guidance_embeds": true,
13
+ "in_channels": 64,
14
+ "joint_attention_dim": 4096,
15
+ "num_attention_heads": 24,
16
+ "num_layers": 4,
17
+ "num_mode": null,
18
+ "num_single_layers": 10,
19
+ "patch_size": 1,
20
+ "pooled_projection_dim": 768
21
+ }
face_combine_workflow.png ADDED

Git LFS Details

  • SHA256: 01160f79b15edb984bdddc4584575a5709fe2147cb88974595f1edf1c399c81d
  • Pointer size: 131 Bytes
  • Size of remote file: 736 kB
musk.png ADDED

Git LFS Details

  • SHA256: 5e2536dc9b7b75956018dc703cf27eea2827c95ee3f5d875a4ec2645c5bab774
  • Pointer size: 131 Bytes
  • Size of remote file: 670 kB
sim_stage1_control_net/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "FluxControlNetModel",
3
+ "_diffusers_version": "0.31.0",
4
+ "_infu_flux_version": "1.0",
5
+ "attention_head_dim": 128,
6
+ "axes_dims_rope": [
7
+ 16,
8
+ 56,
9
+ 56
10
+ ],
11
+ "conditioning_embedding_channels": null,
12
+ "guidance_embeds": true,
13
+ "in_channels": 64,
14
+ "joint_attention_dim": 4096,
15
+ "num_attention_heads": 24,
16
+ "num_layers": 4,
17
+ "num_mode": null,
18
+ "num_single_layers": 10,
19
+ "patch_size": 1,
20
+ "pooled_projection_dim": 768
21
+ }
sim_stage1_control_net/sim_stage1_control_net.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ee8efc6d6e4eb746ea4634318a09c96f4b7c61318d04e644a5351f6e26b5fb5
3
+ size 5905345320
sim_stage1_control_net/sim_stage1_img_proj.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7a8a1b6fecf2731b2ac64bde33a1885014949c8c08f3efaebd0665bb0e8ad8f
3
+ size 338413026
teaser.jpg ADDED

Git LFS Details

  • SHA256: 08543db3b4797a616c8b1ba778916ce440e1475e2653cc5b89ae5d72654cd91e
  • Pointer size: 131 Bytes
  • Size of remote file: 606 kB
workflow_example.png ADDED

Git LFS Details

  • SHA256: f6e475045fe9dbdd751cd899d6947646983f43e55cf6aa0f9f55473907022ecb
  • Pointer size: 131 Bytes
  • Size of remote file: 698 kB