ComfyUI-InstantID
Unofficial implementation of [a/InstantID](https://github.com/InstantID/InstantID) for ComfyUI
Nodes (8)
Pull an SDXL checkpoint straight off HuggingFace
Build InstantID's pipe from a checkpoint you already have
Loading InstantID's IdentityNet, from a local path only
The node that actually puts a face into your image
Eight canned looks for InstantID, no prompt-writing required
The face-embedding model InstantID runs on, in Zho's pack
The one that actually feeds InstantID Generation
The node that actually attaches InstantID to your pipe
ComfyUI InstantID
Unofficial implementation of InstantID for ComfyUI
- pose_ref
项目介绍 | Info
-
来自对InstantID的非官方实现
-
版本:V2.0 支持姿势参考图
视频演示
V2.0
https://github.com/ZHO-ZHO-ZHO/ComfyUI-InstantID/assets/140084057/083c9e5e-06a0-4623-b5ac-05f7e85a74f2
V1.0
https://github.com/ZHO-ZHO-ZHO/ComfyUI-InstantID/assets/140084057/7295c0d7-1d1b-4044-aea3-8efa67047362
节点说明 | Features
-
基础模型加载 | base model loader
- 📷ID Base Model Loader from hub 🤗:支持从 huggingface hub 自动下载模型,输入模型名称(如:wangqixun/YamerMIX_v8)即可
- 📷ID Base Model Loader locally:支持加载本地模型(需 SDXL 系列模型)
-
InsightFace 模型加载 | 📷InsightFace Loader
- :支持 CUDA 和 CPU
-
ID ControlNet 模型加载 | 📷ID ControlNet Loader
- controlnet_path:ID ControlNet 模型地址
-
Ipadapter_instantid 模型加载 | 📷Ipadapter_instantid Loader
- Ipadapter_instantid_path:模型路径
- filename:模型名称
-
提示词 + 风格 | 📷ID Prompt_Styler
- 与各种提示词(文本)输入(如肖像大师等)、styler、 Photomaker Prompt_Styler 兼容
- prompt、negative:正负提示词
- style_name:支持官方提供的8种风格
- (No style)
- Watercolor
- Film Noir
- Neon
- Jungle
- Mars
- Vibrant Color
- Snow
- Line art
-
InstantID 生成 | 📷InstantID Generation 🆕
- face_image:接入脸部参考图像
- pipe:接入模型
- insightface:接入 insightface 模型 🆕
- pose_image_optional(非必要):接入姿势参考图像(注意:仅对面部周围姿势起效,与通常的 openpose 不同)
- positivet、negative:正负提示词
- ip_adapter_scale:IPA 强度
- controlnet_conditioning_scale:ID Controlnet 强度
- step:步数,官方默认30步
- guidance_scale:提示词相关度,一般默认为5
- enhance_face_region:脸部增强选项 🆕
- seed:种子
风格 | Styles
安装 | Install
-
推荐使用管理器 ComfyUI Manager 安装(On the Way)
-
手动安装:
cd custom_nodesgit clone https://github.com/ZHO-ZHO-ZHO/ComfyUI-InstantID.gitcd custom_nodes/ComfyUI-InstantIDpip install -r requirements.txt- 重启 ComfyUI
使用方法 | How to Use
-
下载 InstantID/ControlNetModel 中的 config.json 和 diffusion_pytorch_model.safetensors ,将模型地址填入 📷ID ControlNet Loader 节点中(例如:ComfyUI/custom_nodes/ComfyUI-InstantID/checkpoints/controlnet)
-
下载 InstantID/ip-adapter 中的 ip-adapter.bin ,将其地址填入 📷Ipadapter_instantid Loader 节点中(例如:ComfyUI/custom_nodes/ComfyUI-InstantID/checkpoints)
-
下载 DIAMONIK7777/antelopev2 中的所有模型,将其放入 ComfyUI//custom_nodes/ComfyUI-InstantID/models/antelopev2 中
-
兼容性: CUDA11 支持默认安装的 onnxruntime-gpu(1.16.0),如果是 CUDA12 则需手动安装 onnxruntime-gpu==1.17.0 地址
工作流 | Workflows
V2.0
V1.0 工作流仅适用于V1.0 版本
更新日志
-
20240124
更新为 V2.0 :新增姿势参考图、优化代码
修复 insightfaceloader 冲突问题
修复 onnxruntime-gpu 版本兼容性的问题
-
20240123
V1.0 上线:同时支持本地、huggingface hub托管模型,支持8种风格
-
20240122
创建项目
速度实测 | Speed
-
V1.0
- A100 50步 14s
Stars
关于我 | About me
📬 联系我:
- 邮箱:[email protected]
- QQ 群:839821928
🔗 社交媒体:
💡 支持我:
Credits
📷InsightFace Loader 代码修改自 ComfyUI_IPAdapter_plus,感谢 @cubiq!
感谢 @hidecloud 对 onnxruntime 版本兼容性的测试与反馈!
感谢 esheep 技术人员对节点冲突问题的反馈!