zsxkib / flux-pulid

⚡️FLUX PuLID: FLUX-dev based Pure and Lightning ID Customization via Contrastive Alignment🎭

  • Public
  • 243.5K runs
  • GitHub
  • Paper
  • License

Run time and cost

This model costs approximately $0.025 to run on Replicate, or 40 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia A100 (80GB) GPU hardware. Predictions typically complete within 19 seconds.

Readme

PuLID for FLUX

Welcome to PuLID-FLUX-v0.9.0, a tuning-free ID customization solution for FLUX.1-dev.

🆕 Looking for the classic PuLID for Stable Diffusion XL? Check out our Classic PuLID demo!

About PuLID for FLUX

PuLID (Pure and Lightning ID customization) is an AI model that customizes images, especially faces, while keeping important identity features. This version is specifically optimized for FLUX.1-dev. Here’s what PuLID for FLUX does:

  • It adds a specific identity (like a person’s face) to the FLUX.1-dev text-to-image model without changing how the model usually works.
  • It creates images with high identity similarity.
  • It lets you change things like attributes, styles, and backgrounds using text prompts.
  • It keeps image elements like background, lighting, and style consistent.
  • It gives you lots of options to edit and change the generated images.

PuLID for FLUX uses some cool tech stuff: - It has two main parts: a regular diffusion training part and a new Lightning T2I part. - It uses special ways to understand facial identity. - It uses a technique called “contrastive alignment” to keep images consistent. - It can create images quickly while still getting the identity right.

You can use PuLID for FLUX for things like: - Making avatars and characters - Editing and improving faces - Creating digital art - Making prototypes and visualizations

How to Use This Replicate Demo

  1. Upload an image with the identity you want to use.
  2. Write a prompt describing the image you want to create.
  3. Adjust the settings if you need to (check out the “Useful Tips” below).
  4. Click to generate your customized image!

Useful Tips

Two important settings to think about:

  1. Timestep to start inserting ID:
  2. This decides when to start adding the identity during image creation.
  3. Lower numbers (0-1) make the identity look more similar but might be harder to edit.
  4. Higher numbers (like 4) are easier to edit but might make the identity less similar.
  5. We suggest using 4 for realistic images, and 0-1 for stylized images.

  6. True CFG scale:

  7. FLUX.1-dev uses something called a “fake CFG” usually.
  8. You can choose to use either fake CFG or true CFG.
  9. Fake CFG often works well for realistic-looking scenes.
  10. True CFG might make the identity look more similar in some cases.
  11. Try true CFG for stylized scenes if the identity doesn’t look similar enough or the style isn’t quite right.

Limitations

This is a test version. We’ve noticed that it might not work as well for some male faces. We’re working on making it better, so check back for updates!

Examples

Here are some examples generated with PuLID-FLUX:

PuLID-FLUX Examples

Learn More

For more technical details, latest updates, and additional examples, visit our GitHub repository.

If PuLID-FLUX is helpful, please star our repo or tell your friends about it!

Questions or Suggestions?

If you have questions or ideas, please open an issue on our GitHub repository.

Citation

If you use PuLID in your work, please cite:

@article{guo2024pulid,
  title={PuLID: Pure and Lightning ID Customization via Contrastive Alignment},
  author={Guo, Zinan and Wu, Yanze and Chen, Zhuowei and Chen, Lang and He, Qian},
  journal={arXiv preprint arXiv:2404.16022},
  year={2024}
}

Support

For updates and more AI content, follow: - The lead developers: - Yanze Wu: GitHub - Zinan Guo: Email - If you like my work, please follow me! @zsakib