tungmtp's picture
Upload 99 files
7879e67 verified
alibaba alimama

ComfyUI EcomID (Native Support)

Native SDXL-EcomID support for ComfyUI.

This extension doesn't use diffusers but instead implements EcomID natively and it fully integrates with ComfyUI.

Show Cases

EcomID enhances portrait representation, delivering a more authentic and aesthetically pleasing appearance while ensuring semantic consistency and greater internal ID similarity (i.e., traits that do not vary with age, hairstyle, glasses, or other physical changes).

Prompt Reference Image EcomID InstantID PuLID
A close-up portrait of a little girl with double braids, wearing a white dress, standing on the beach during sunset. 参考图像 EcomID图像 InstantID图像 PuLID图像
A close-up portrait of a very little girl with double braids, wearing a hat and white dress, standing on the beach during sunset. 参考图像 EcomID图像 InstantID图像 PuLID图像
Agrizzled detective, fedora casting a shadow over his square jaw, a cigar dangling from his lips, his trench coat evocative of film noir, in a rainy alley. 参考图像 EcomID图像 InstantID图像 PuLID图像
A smiling girl with bangs and long hair in a school uniform stands under cherry trees, holding a book. 参考图像 EcomID图像 InstantID图像 PuLID图像
A very old witch, wearing a black cloak, with a pointed hat, holding a magic wand, against a background of a misty forest. 参考图像 EcomID图像 InstantID图像 PuLID图像
A man clad in cyberpunk fashion: neon accents, reflective sunglasses, and a leather jacket with glowing circuit patterns. He stands stoically amidst a soaked cityscape. 参考图像 EcomID图像 InstantID图像 PuLID图像

You can see more showcases in the SDXL-EcomID repository.

Basic Workflow

In the examples directory you'll find the basic workflow.

workflow

Installation

Upgrade ComfyUI to the latest version!

Download or git clone this repository into the ComfyUI/custom_nodes/ directory or use the Manager.

EcomID requires insightface, you need to add it to your libraries together with onnxruntime and onnxruntime-gpu.

Models:

  • PuLID pre-trained model goes in ComfyUI/models/pulid/ (thanks to Chenlei Hu for converting them into IPAdapter format)
  • The EVA CLIP is EVA02-CLIP-L-14-336, but should be downloaded automatically (will be located in the huggingface directory).
  • facexlib dependency needs to be installed, the models are downloaded at first use
  • You also need InsightFace with AntelopeV2, the unzipped models should be placed in ComfyUI/models/insightface/models/antelopev2
  • The ip_adapter model of InstantID can be downloaded from HuggingFace and should be placed into the ComfyUI/models/instantid directory. (Note that the model is called ip_adapter as it is based on the IPAdapter).
  • You also needs a ControlNet trained on 2M real human images. Please place it in the ComfyUI controlnet directory.

Various Resolutions

Feel free to generate images in various resolutions, as we have trained the controlnet on 2 million high-quality images.

Normal CFG

You can set a higher CFG value to achieve even better semantic consistency. Values from 1 to 7 are acceptable, with 6 being recommended.

Face keypoints

The pose of the person is aligned with the keypoints generated from the reference image, just like in InstantID. You can achieve a different pose by sending an image to the image_kps input.

KeyPoint

Advanced Node

There's an EcomID advanced node available, at the moment the only difference with the standard one is that you can set the weights for the ip-adapter (PulID) models and the controlnet separately.

Other notes

The results of the Multi-ControlNet are shown below: Multi-ControlNet Result