Image-to-Image
Diffusers
ONNX
makeup-transfer
makeup-removal
image-editing
one-step-diffusion
flow-matching
qwen-image
lora
Run this model with HF Jobs
Run csbowei/RnV on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/csbowei/RnV. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/csbowei/RnV on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use csbowei/RnV with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use csbowei/RnV 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("Qwen/Qwen-Image-2.1", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("csbowei/RnV") 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] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
|
Download README.md from csbowei/RnV: direct link, hf CLI and curl.
- Browser
- Download file 4.18 kB
-
https://huggingface.co/csbowei/RnV/resolve/main/README.md
- Command line
-
hf download hf://csbowei/RnV/README.md
-
curl -L -o README.md https://huggingface.co/csbowei/RnV/resolve/main/README.md
4.18 kB
| license: cc-by-nc-sa-4.0 | |
| base_model: Qwen/Qwen-Image-2.1 | |
| pipeline_tag: image-to-image | |
| library_name: diffusers | |
| tags: | |
| - makeup-transfer | |
| - makeup-removal | |
| - image-editing | |
| - one-step-diffusion | |
| - flow-matching | |
| - qwen-image | |
| - lora | |
| # Reconstruct and Verify: One-Step Diffusion for High-Fidelity Makeup Transfer | |
| <p> | |
| <a href="#"><img src="https://img.shields.io/badge/arXiv-Coming%20Soon-red?style=flat-square" alt="arXiv (Coming Soon)"></a> | |
| <a href="https://csbowei.github.io/RnV/" target="_blank"><img src="https://img.shields.io/badge/Project-Homepage-green?style=flat-square" alt="Project Homepage"></a> | |
| <a href="https://github.com/csbowei/RnV" target="_blank"><img src="https://img.shields.io/badge/GitHub-Code-black?style=flat-square&logo=github" alt="GitHub Code"></a> | |
| <a href="https://huggingface.co/spaces/csbowei/RnV-Makeup-Transfer" target="_blank"><img src="https://img.shields.io/badge/π€%20Hugging%20Face-Space-orange?style=flat-square" alt="HF Space"></a> | |
| </p> | |
| Official pretrained weights for **Reconstruct and Verify: One-Step Diffusion for High-Fidelity Makeup Transfer (RnV)**. | |
| **RnV** performs high-fidelity **makeup transfer** and **makeup removal** in **one step** at up to **2K** resolution while preserving source facial identity, skin texture, expressions, lighting, and occlusions. | |
| --- | |
| ## π¦ Repository Contents | |
| ```text | |
| RnV/ | |
| βββ transfer/ | |
| β βββ transfer_tau0p7.safetensors # Vivid (default, Ο = 0.7) | |
| β βββ transfer_tau0p8.safetensors # Balanced (Ο = 0.8) | |
| β βββ transfer_tau0p9.safetensors # Faithful (Ο = 0.9) | |
| βββ demakeup/ | |
| β βββ demakeup.safetensors # Makeup removal | |
| βββ align/ | |
| βββ det_10g.onnx # SCRFD-10G face detector (for Gradio demo) | |
| βββ 2d106det.onnx # 106-point landmark detector (for Gradio demo) | |
| ``` | |
| | File | Mode / Task | Description | SHA-256 (prefix) | | |
| | :--- | :--- | :--- | :---: | | |
| | `transfer/transfer_tau0p7.safetensors` | **Vivid** (`Ο = 0.7`, default) | Reproduces the full makeup look, including foundation and base coverage | `aeda66cb3b4e` | | |
| | `transfer/transfer_tau0p8.safetensors` | **Balanced** (`Ο = 0.8`) | Balances rich makeup reproduction with natural skin-tone blending | `210062e4ba10` | | |
| | `transfer/transfer_tau0p9.safetensors` | **Faithful** (`Ο = 0.9`) | Preserves original skin tone and natural complexion, focusing on eye, lip, and cheek makeup | `dd47d175c6be` | | |
| | `demakeup/demakeup.safetensors` | **Makeup Removal** | Unified one-step makeup removal LoRA | `6334af93646c` | | |
| | `align/det_10g.onnx`, `align/2d106det.onnx` | **Face Alignment** | 106-landmark face alignment models for Gradio demo | `5838f7fe0536` / `f001b856447c` | | |
| --- | |
| ## π Quick Start | |
| ### 1. Clone Code & Download Weights | |
| ```bash | |
| git clone https://github.com/csbowei/RnV.git | |
| cd RnV | |
| pip install -r ./requirements.txt | |
| hf download csbowei/RnV --local-dir ./checkpoints | |
| ``` | |
| ### 2. Run Inference | |
| ```bash | |
| # Makeup transfer (--mode: vivid | balanced | faithful) | |
| python infer.py \ | |
| --task transfer \ | |
| --mode vivid \ | |
| --input ./examples/source/src_01.jpg \ | |
| --ref ./examples/reference/ref_01.jpg \ | |
| --model_path Qwen/Qwen-Image-2.1 \ | |
| --resolution 1024 \ | |
| --output_dir ./outputs/infer \ | |
| --save_concat | |
| # Makeup removal | |
| python infer.py \ | |
| --task demakeup \ | |
| --input ./examples/reference/ref_01.jpg \ | |
| --model_path Qwen/Qwen-Image-2.1 \ | |
| --resolution 1024 \ | |
| --output_dir ./outputs/infer \ | |
| --save_concat | |
| # Interactive Gradio demo | |
| python app.py --port 7860 | |
| ``` | |
| --- | |
| ## π License | |
| - **RnV LoRA Weights (`transfer/*.safetensors`, `demakeup/*.safetensors`)**: Released under **[CC BY-NC-SA 4.0](./LICENSE)** for non-commercial academic research and creative use, subject to the upstream terms of [`Qwen/Qwen-Image-2.1`](https://huggingface.co/Qwen/Qwen-Image-2.1). | |
| - **Face Alignment Models (`align/det_10g.onnx`, `align/2d106det.onnx`)**: Sourced from [InsightFace](https://github.com/deepinsight/insightface) (`buffalo_l`) under InsightFace's non-commercial research license. | |