Instructions to use ming0531/IrisMix with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ming0531/IrisMix with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-4B", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("ming0531/IrisMix") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
|
Download README.md from ming0531/IrisMix: direct link, hf CLI and curl.
- Browser
- Download file 6.9 kB
-
https://huggingface.co/ming0531/IrisMix/resolve/main/README.md
- Command line
-
hf download hf://ming0531/IrisMix/README.md
-
curl -L -o README.md https://huggingface.co/ming0531/IrisMix/resolve/main/README.md
6.9 kB
| license: cc-by-nc-4.0 | |
| base_model: black-forest-labs/FLUX.2-klein-4B | |
| library_name: diffusers | |
| pipeline_tag: image-to-image | |
| tags: | |
| - makeup-transfer | |
| - makeup-editing | |
| - layer-decomposition | |
| - lora | |
| - flux | |
| datasets: | |
| - ming0531/LayerBeauty | |
| <h1 align="center">IrisMix</h1> | |
| <p align="center"><b>Compositional Makeup Transfer and Editing with Layered Diffusion</b></p> | |
| <p align="center"> | |
| <a href="https://arxiv.org/abs/2611.35956"><img src="https://img.shields.io/badge/arXiv-2611.35956-b31b1b?style=for-the-badge&logo=arxiv&logoColor=white" alt="arXiv"></a> | |
| <a href="https://ming053l.github.io/IrisMix/"><img src="https://img.shields.io/badge/Project-Page-c9606f?style=for-the-badge&logo=googlechrome&logoColor=white" alt="Project page"></a> | |
| <a href="https://github.com/ming053l/IrisMix"><img src="https://img.shields.io/badge/Code-GitHub-181717?style=for-the-badge&logo=github&logoColor=white" alt="Code"></a> | |
| <a href="https://huggingface.co/datasets/ming0531/LayerBeauty"><img src="https://img.shields.io/badge/Dataset-LayerBeauty-ffcc4d?style=for-the-badge&logo=huggingface&logoColor=black" alt="LayerBeauty"></a> | |
| </p> | |
| <p align="center"> | |
| <img src="https://raw.githubusercontent.com/ming053l/IrisMix/main/assets/readme/irismix_loop.webp" width="100%" alt="A makeup photo is split into its bare face and an editable makeup layer; the layer is rendered on a new face and recolored, then rendered on four more real photos"> | |
| </p> | |
| This repository holds the weights of **IrisMix**, the models reported in the paper. IrisMix keeps makeup as an explicit | |
| layer inside a diffusion model: | |
| - **Decompose.** Each reference photo is split into a bare face and a reusable makeup layer (coverage and color). | |
| - **Compose.** A look can take its eyes, lips, face and forehead from different references. | |
| - **Render.** The composed look is rendered onto a new face in one step, adapted to the face shape and the light of the photo. | |
| - **Edit.** The result is again a layer, so color, strength and single parts can be changed afterwards without generating again. | |
| A look composed from three references is decomposed and rendered in **3.8 s** on one GPU (MagicMakeup 245.1 s, ART | |
| 155.3 s), and each later layer edit takes **1.3 ms**. IrisMix also removes the makeup a person already wears and lifts | |
| glasses or bangs off before the transfer, then puts them back. | |
| <p align="center"> | |
| <img src="https://raw.githubusercontent.com/ming053l/IrisMix/main/assets/v2/fig/teaser.webp" width="100%" alt="Makeup composed from several references, repeated edits, transfer with glasses, and layer edits after rendering"> | |
| </p> | |
| ## Files | |
| LoRA adapters (rank 32) and skip-connection weights for | |
| [FLUX.2 [klein] 4B](https://huggingface.co/black-forest-labs/FLUX.2-klein-4B). The base model is not included; it is | |
| downloaded from Hugging Face on first use. | |
| | File | What it is | Tensors | Size (bytes) | sha256 | | |
| |---|---|---|---|---| | |
| | `irismix_lora_init.safetensors` | initial LoRA: creates the rank-32 LoRA modules of both models (diffusers / PEFT format) | 120 LoRA | 66,866,216 | `6f05958ff2e5735de51acce6f2125c18246bf97c3e11c3e6eb87653124ea8786` | | |
| | `irismix_decomposer.safetensors` | the decomposer: transformer LoRA and skip convolutions `skips.E.*` (decompose) and `skips.H.*` (harmonize; not used at inference) | 120 LoRA + 12 skip | 68,709,512 | `efa679e478c6087a033a3a168d7e40dfcc621d53e63e2e25dec6b02aea19f0c8` | | |
| | `irismix_renderer.safetensors` | the renderer: bias-corrected EMA of the render LoRA and skip convolutions `skips.z.*` | 120 LoRA + 6 skip | 67,786,352 | `1d4b1651bdd1888426ae71ee3f76920f94f5f18b95457e81d09a4420d967de5b` | | |
| The tensors were converted from the training checkpoints without changing any value (checked tensor by tensor). LoRA | |
| tensors are bf16 and named after the loaded PEFT modules (`transformer_blocks.<i>.attn.to_q.lora_A.default_0.weight`, | |
| ...); the skip convolutions are fp32. The inference code checks that all 120 LoRA tensors match their modules. | |
| ## Quick start | |
| ```bash | |
| git clone https://github.com/ming053l/IrisMix.git && cd IrisMix | |
| conda create -n irismix python=3.10 -y && conda activate irismix | |
| pip install torch==2.7.1 --index-url https://download.pytorch.org/whl/cu128 | |
| pip install -r requirements.txt | |
| huggingface-cli download ming0531/IrisMix --local-dir weights # optional: missing weights are downloaded on first use | |
| # one reference for the whole look | |
| python scripts/infer.py --src source.jpg --ref reference.jpg --out out/ | |
| # eyes, lips and face from different references, then edit the rendered layer | |
| python scripts/infer.py --src source.jpg --eyes ref_a.jpg --lips ref_b.jpg --face ref_c.jpg --out out/ \ | |
| --strength 0.6 --recolour lips=#b0303a | |
| ``` | |
| The outputs are `result.png` (the render), `layer.png` (the makeup layer as RGBA), `layer.npz` and `edited.png` when an | |
| edit is requested. `python scripts/viewer.py --port 7007` starts **IrisMix Studio**, a browser interface for the whole | |
| method, and the repository also has **ComfyUI nodes**. See [github.com/ming053l/IrisMix](https://github.com/ming053l/IrisMix). | |
| **Hardware.** A 24 GB GPU runs everything. Measured peaks: 9.4 GB for a render with a cached caption, 15.6 GB with a new | |
| caption, 18.3 GB with bangs removal. | |
| **Verify the download:** `sha256sum weights/*.safetensors` and compare with the table above. | |
| ## Training data | |
| The decomposer and the renderer were trained on [LayerBeauty](https://huggingface.co/datasets/ming0531/LayerBeauty), | |
| synthetic portraits paired with their bare faces and explicit makeup layers (13,273 creative and 4,794 daily looks in the | |
| release). | |
| ## Terms of use | |
| By downloading or using the IrisMix weights you agree to the following. | |
| - **Non-commercial only.** The weights are licensed under CC BY-NC 4.0 | |
| (https://creativecommons.org/licenses/by-nc/4.0/) for non-commercial research and education. Commercial use is not | |
| allowed: no selling, no paid products or services, and no training of models for commercial use. The face parser | |
| required at inference is itself licensed for non-commercial use only. | |
| - **No unlawful or harmful use.** Do not use the weights in ways that break the law or violate other people's rights, such as | |
| impersonation, deceptive face edits, harassment, or editing someone's photo without their consent. Label edited images | |
| where that matters. | |
| - **Citation is required.** Any paper, report, code, model or dataset that uses the weights must cite the IrisMix paper. | |
| ## Citation | |
| ```bibtex | |
| @misc{lee2026irismix, | |
| title = {{IrisMix}: Compositional Makeup Transfer and Editing with Layered Diffusion}, | |
| author = {Lee, Chia-Ming and Chang, Ming-Ching and Li, Xin and | |
| Shuai, Hong-Han and Liu, Yu-Lun and Hsu, Chih-Chung}, | |
| year = {2026}, | |
| eprint = {2611.35956}, | |
| archivePrefix = {arXiv}, | |
| primaryClass = {cs.CV}, | |
| url = {https://arxiv.org/abs/2611.35956} | |
| } | |
| ``` | |