chestnutlzj's picture
Update model card with UniWorld-V2 paper link and main GitHub repository (#1)
8445e41 verified
metadata
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.

Code | Dataset

Performance

Benchmark FLUX.1-Kontext-dev Edit-R1-FLUX.1-Kontext-dev
GEdit-Bench 6.00 6.74
ImgEdit 3.71 4.02

Usage

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.