12 KiB
license
| license |
|---|
| apache-2.0 |
EcomID aims to generate customized images from a single reference ID image, ensuring strong semantic consistency while being controlled by keypoints.
This repository provides the EcomID method and model, combining the strengths of PuLID and InstantID for better background consistency, facial keypoint control, and realistic facial representation with improved similarity.
EcomID Overview
EcomID Structure
- IP-Adapter of PuLID: EcomID incorporates the ID-Encoder and cross-attention components from PuLID, trained with alignment loss. This method effectively reduces the interference of ID embeddings on text embeddings within the cross-attention part, minimizing disruption to the underlying model's text-to-image capabilities.
- InstantID’s IdentityNet Architecture: Utilizing a dataset of 2 million aesthetically pleasing portrait images, IdentityNet enhances keypoint control, improving ID consistency and facial realism. During training, the IP-adapter is frozen, and only the IdentityNet is trained. Facial landmarks are used as conditional inputs, while face embeddings are integrated into IdentityNet via cross-attention.
Show Cases
Comparison with Other Methods
1、Preserved Text-to-Image Capability
| Prompt | Reference Image | EcomID | InstantID |
|---|---|---|---|
| girl, white skin, black hair, long wavy hair, in European style living room, Retro tone, decorations, depth of field. | ![]() |
![]() |
![]() |
As shown above, EcomID preserves background generation abilities while minimizing stylization, greatly enhancing realism. The visualizations highlight more authentic portraits with improved background semantic consistency, showcasing EcomID's advantage in generating realistic images.
2、Improved Facial Control and Consistency
| Prompt | Reference Image | EcomID | InstantID | PuLID |
|---|---|---|---|---|
| A close-up portrait of a man standing in the library, holding two smiling toddlers next to him. | ![]() |
![]() |
![]() |
![]() |
As shown above, EcomID employs keypoints as conditional inputs for training, allowing for precise adjustments of facial positions, sizes, and orientations. This capability ensures that the generated portraits are more controllable while further enhancing facial similarity and the overall quality of the images.
More showcases
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).
More Base Models, Resolutions, and Styles
Notes
- Unless otherwise specified, the showcases are generated using the base model EcomXL, which is also highly compatible with various other SDXL-based models, such as leosams-helloworld-xl, dreamshaper-xl, stable-diffusion-xl-base-1.0 and so on.
- It works very well with SDXL Turbo/Lighting, EcomXL Inpainting ControlNet and EcomXL Softedge ControlNet.
How to use
ComfyUI
- The EcomID_ComfyUI node has been released: click here
Training Details
The model is trained on 2M Taobao images, where the proportion of human faces is greater than 3%. The images have a resolution greater than 800, and the aesthetic score is above 5.5.
Mixed precision: fp16
Learning rate: 1e-4
Batch size: 2
Image size: 1024x1024











































