Instructions to use chestnutlzj/Edit-R1-FLUX.1-Kontext-dev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use chestnutlzj/Edit-R1-FLUX.1-Kontext-dev 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("chestnutlzj/Edit-R1-FLUX.1-Kontext-dev", dtype=torch.bfloat16, device_map="cuda") 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,6 +12,14 @@ pipeline_tag: image-to-image
|
|
| 12 |
<a href="https://github.com/PKU-YuanGroup/Edit-R1"><b>Code</b></a> | <a href="https://github.com/PKU-YuanGroup/Edit-R1"><b>Dataset</b></a>
|
| 13 |
</p>
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
# Usage
|
| 16 |
|
| 17 |
```python
|
|
|
|
| 12 |
<a href="https://github.com/PKU-YuanGroup/Edit-R1"><b>Code</b></a> | <a href="https://github.com/PKU-YuanGroup/Edit-R1"><b>Dataset</b></a>
|
| 13 |
</p>
|
| 14 |
|
| 15 |
+
|
| 16 |
+
# Performance
|
| 17 |
+
|
| 18 |
+
|Benchmark| FLUX.1-Kontext-dev | Edit-R1-FLUX.1-Kontext-dev |
|
| 19 |
+
| ---- | ---- | ----|
|
| 20 |
+
| GEdit-Bench | 6.00 | **6.74** |
|
| 21 |
+
| ImgEdit | 3.71 | **4.02** |
|
| 22 |
+
|
| 23 |
# Usage
|
| 24 |
|
| 25 |
```python
|