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.
RnV / README.md
csbowei's picture
update README.md
8ec5589 verified
|
Raw History Blame Contribute Delete
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>&nbsp;
<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>&nbsp;
<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>&nbsp;
<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.