siliconflow/PuLID
forked from ToTheBeginning/PuLID
Captured source
source ↗siliconflow/PuLID
Description: [NeurIPS 2024] Official code for PuLID: Pure and Lightning ID Customization via Contrastive Alignment
License: Apache-2.0
Stars: 0
Forks: 0
Open issues: 0
Created: 2025-05-21T03:01:03Z
Pushed: 2025-05-08T14:59:06Z
Default branch: main
Fork: yes
Parent repository: ToTheBeginning/PuLID
Archived: no
README:
PuLID (NeurIPS 2024)
:open_book: PuLID: Pure and Lightning ID Customization via Contrastive Alignment
> Zinan Guo*, Yanze Wu*✝, Zhuowei Chen, Lang Chen, Peng Zhang, Qian He
> (*Equal Contribution, ✝Corresponding Author)
> ByteDance Inc
🔥🔥 We are excited to share DreamO, a unified image customization framework that supports ID, IP, Try-On, and style tasks. Check it out and see what it can do! 🔥🔥
:triangular_flag_on_post: Updates
- 2024.10.31: 🔥 We are happy to release our latest models, PuLID-v1.1 and PuLID-FLUX-v0.9.1. See more in [Model Zoo](#european_castle-model-zoo) and [pulid v1.1 model](docs/pulid_v1.1.md). We also update a new revision for the arXiv paper, which includes more results, details, and analysis, please check it out.
- 2024.09.26: 🎉 PuLID accepted by NeurIPS 2024
- 2024.09.12: We're thrilled to announce the release of the PuLID-FLUX-v0.9.0 model. Enjoy exploring its capabilities! 😊 [Learn more about this model](docs/pulid_for_flux.md)
- 2024.05.23: share the [preview of our upcoming v1.1 model](docs/v1.1_preview.md), please stay tuned
- 2024.05.01: release v1 codes&models, also the 🤗HuggingFace Demo
- 2024.04.25: release arXiv paper.
PuLID for FLUX
Please check the doc and demo of PuLID-FLUX [here](docs/pulid_for_flux.md).
updates
- [x] Local gradio demo is ready now
- [x] We have optimized the codes to support consumer-grade GPUS, and now PuLID-FLUX can run on a 16GB graphic card. Check the details here
- [x] (Community Implementation) Online Replicate demo is ready now 
- [x] Local gradio demo supports 12GB graphic card now
- [x] v0.9.1 is ready now
Below results are generated with PuLID-FLUX. !pulid_flux_results
Examples
Images generated with our PuLID !examples Applications
https://github.com/ToTheBeginning/PuLID/assets/11482921/9bdd0c8a-99e8-4eab-ab9e-39bf796cc6b8
:european_castle: Model Zoo
| Version | Base Model | Description | |:--------------------------------------------------------------------------------------------------:|:----------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| | PuLID-v1 | SDXL | Paper model. | | PuLID-v1.1 | SDXL | Compared to PuLID-v1, better compatibility, editability, facial naturalness, and similarity. | | PuLID-FLUX-v0.9.0 | FLUX | Our first version for PuLID-FLUX, better prompt-following and image quality (since FLUX is more powerful than SDXL). But ID fidelity is not high enough for some male inputs | | PuLID-FLUX-v0.9.1 | FLUX | Compared to PuLID-FLUX-v0.9.0, better ID fidelity. From the quantitative metric of ID similarity, the improvement is about 5 percentage points. Meanwhile, the editability remains similar as before. |
:wrench: Dependencies and Installation
- Python >= 3.9 (Recommend to use Anaconda or Miniconda)
- PyTorch >= 2.0 if you don't need flux-dev-fp8, otherwise PyTorch >= 2.4.1
# clone PuLID repo git clone https://github.com/ToTheBeginning/PuLID.git cd PuLID # create conda env conda create --name pulid python=3.10 # activate env conda activate pulid # Install dependent packages # 1. if you don't need flux-fp8, e.g., you are using xl or flux-bf16, install the following requirements.txt pip install -r requirements.txt # 2. if you need flux-fp8 (to put flux on consumer-grade gpu), install the following requirements_fp8.txt pip install -r requirements_fp8.txt
:zap: Quick Inference
Local Gradio Demo
# for v1 version python app.py # for v1.1 version python app_v1.1.py --base BASE_MODEL Usage: -base: can be RunDiffusion/Juggernaut-XL-v9 or Lykon/dreamshaper-xl-lightning
Online HuggingFace Demo
Thanks for the GPU grant from HuggingFace team, you can try PuLID HF demo in
- https://huggingface.co/spaces/yanze/PuLID for SDXL
- https://huggingface.co/spaces/yanze/PuLID-FLUX for FLUX
:paperclip: Related Resources
Following are some third-party implementations of PuLID we have found in the Internet. We appreciate the efforts of the respective developers for making PuLID accessible to a wider audience. If there are any PuLID based resources and applications that we have not mentioned here, please let us know, and we will include them in this list.
Online Demo
- Colab: https://github.com/camenduru/PuLID-jupyter provided by camenduru
- Replicate (PuLID): https://replicate.com/zsxkib/pulid provided by zsxkib
- Replicate (PuLID-FLUX): https://replicate.com/zsxkib/flux-pulid provided by zsxkib
ComfyUI
- https://github.com/cubiq/PuLID_ComfyUI provided by cubiq, native ComfyUI implementation
- https://github.com/ZHO-ZHO-ZHO/ComfyUI-PuLID-ZHO provided by ZHO, diffusers-based implementation
WebUI
-…
Excerpt shown — open the source for the full document.
Notability
notability 2.0/10Routine fork, no traction