File size: 1,452 Bytes
			
			| 849a228 8445e41 849a228 983d475 849a228 8445e41 849a228 8445e41 849a228 e0481ae 849a228 5195675 849a228 5195675 849a228 5195675 e48bfa2 849a228 5195675 849a228 5195675 8445e41 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | ---
language:
- en
library_name: diffusers
license: apache-2.0
pipeline_tag: image-to-image
---
# UniWorld-R1
This model is part of the work presented in the paper [Uniworld-V2: Reinforce Image Editing with Diffusion Negative-aware Finetuning and MLLM Implicit Feedback](https://huggingface.co/papers/2510.16888).
<p align="center">
        <a href="https://github.com/PKU-YuanGroup/UniWorld-V2"><b>Code</b></a> | <a href="https://github.com/PKU-YuanGroup/Edit-R1"><b>Dataset</b></a>
</p>
# Performance
|Benchmark| FLUX.1-Kontext-dev  | Edit-R1-FLUX.1-Kontext-dev |
| ---- | ---- | ----|
| GEdit-Bench | 6.00 | **6.74** |
| ImgEdit | 3.71 | **4.02** |
# Usage
```python
import torch
from diffusers import FluxKontextPipeline
from diffusers.utils import load_image
pipe = FluxKontextPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", torch_dtype=torch.bfloat16)
pipe.load_lora_weights(
    "chestnutlzj/Edit-R1-FLUX.1-Kontext-dev",
    adapter_name="lora",
)
pipe.set_adapters(["lora"], adapter_weights=[1])
pipe.to("cuda")
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
image = pipe(
  image=input_image,
  prompt="Add a hat to the cat",
  guidance_scale=2.5
).images[0]
```
# Licence
FLUX.1-Kontext-dev falls under the [FLUX.1 [dev] Non-Commercial License](https://github.com/black-forest-labs/flux/blob/main/model_licenses/LICENSE-FLUX1-dev). | 
