Instructions to use FireRedTeam/FireRed-Image-Edit-1.0-Lightning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use FireRedTeam/FireRed-Image-Edit-1.0-Lightning 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("FireRedTeam/FireRed-Image-Edit-1.0-Lightning", 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
Add link to paper and code, improve model card structure
Browse filesHi! I'm Niels from the Hugging Face community team.
This PR improves the model card for **FireRed-Image-Edit-1.0-Lightning** by adding links to the technical report, the official GitHub repository, and the Gradio demo. Providing these links makes it easier for users and researchers to find the source code and technical details. I have also added the citation information and ensured the `diffusers` usage snippet is correctly formatted.
README.md
CHANGED
|
@@ -1,24 +1,37 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
- zh
|
| 6 |
-
|
| 7 |
-
|
| 8 |
pipeline_tag: image-to-image
|
| 9 |
tags:
|
| 10 |
- FireRed-Image-Edit-1.0
|
| 11 |
- distillation
|
| 12 |
- LoRA
|
| 13 |
-
library_name: diffusers
|
| 14 |
---
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
```
|
|
|
|
|
|
|
| 22 |
from diffusers import QwenImageEditPlusPipeline
|
| 23 |
import torch
|
| 24 |
from PIL import Image
|
|
@@ -26,8 +39,11 @@ from PIL import Image
|
|
| 26 |
pipe = QwenImageEditPlusPipeline.from_pretrained(
|
| 27 |
"FireRedTeam/FireRed-Image-Edit-1.0", torch_dtype=torch.bfloat16,
|
| 28 |
).to("cuda")
|
|
|
|
|
|
|
| 29 |
pipe.load_lora_weights(
|
| 30 |
-
"FireRedTeam/FireRed-Image-Edit-1.0-Lightning",
|
|
|
|
| 31 |
)
|
| 32 |
|
| 33 |
prompt = "在书本封面Python的下方,添加一行英文文字2nd Edition"
|
|
@@ -41,7 +57,23 @@ image = pipe(
|
|
| 41 |
width = None,
|
| 42 |
num_inference_steps = 8,
|
| 43 |
generator=torch.manual_seed(0),
|
| 44 |
-
true_cfg_scale=1.0, #
|
| 45 |
).images[0]
|
|
|
|
| 46 |
image.save("firered_image_edit_fewsteps.png")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
```
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model:
|
| 3 |
+
- FireRedTeam/FireRed-Image-Edit-1.0
|
| 4 |
language:
|
| 5 |
- en
|
| 6 |
- zh
|
| 7 |
+
library_name: diffusers
|
| 8 |
+
license: apache-2.0
|
| 9 |
pipeline_tag: image-to-image
|
| 10 |
tags:
|
| 11 |
- FireRed-Image-Edit-1.0
|
| 12 |
- distillation
|
| 13 |
- LoRA
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# FireRed-Image-Edit-1.0-Lightning
|
| 17 |
+
|
| 18 |
+
This repository contains the distilled "Lightning" LoRA weights for [FireRed-Image-Edit-1.0](https://huggingface.co/FireRedTeam/FireRed-Image-Edit-1.0), enabling fast, high-quality instruction-based image editing in just 8 steps.
|
| 19 |
+
|
| 20 |
+
For more technical details, please refer to the [FireRed-Image-Edit-1.0 Technical Report](https://huggingface.co/papers/2602.13344).
|
| 21 |
|
| 22 |
+
- **Project Page:** [FireRed-Image-Edit-1.0 Space](https://huggingface.co/spaces/FireRedTeam/FireRed-Image-Edit-1.0)
|
| 23 |
+
- **Repository:** [FireRedTeam/FireRed-Image-Edit](https://github.com/FireRedTeam/FireRed-Image-Edit)
|
| 24 |
+
- **Paper:** [FireRed-Image-Edit-1.0 Technical Report](https://huggingface.co/papers/2602.13344)
|
| 25 |
|
| 26 |
+
## Use with diffusers 🧨
|
| 27 |
+
|
| 28 |
+
To use this distilled LoRA, make sure to install `diffusers` from `main`:
|
| 29 |
+
|
| 30 |
+
```bash
|
| 31 |
+
pip install git+https://github.com/huggingface/diffusers.git
|
| 32 |
```
|
| 33 |
+
|
| 34 |
+
```python
|
| 35 |
from diffusers import QwenImageEditPlusPipeline
|
| 36 |
import torch
|
| 37 |
from PIL import Image
|
|
|
|
| 39 |
pipe = QwenImageEditPlusPipeline.from_pretrained(
|
| 40 |
"FireRedTeam/FireRed-Image-Edit-1.0", torch_dtype=torch.bfloat16,
|
| 41 |
).to("cuda")
|
| 42 |
+
|
| 43 |
+
# Load the distilled Lightning LoRA weights
|
| 44 |
pipe.load_lora_weights(
|
| 45 |
+
"FireRedTeam/FireRed-Image-Edit-1.0-Lightning",
|
| 46 |
+
weight_name="FireRed-Image-Edit-1.0-Lightning-8steps-v1.0.safetensors"
|
| 47 |
)
|
| 48 |
|
| 49 |
prompt = "在书本封面Python的下方,添加一行英文文字2nd Edition"
|
|
|
|
| 57 |
width = None,
|
| 58 |
num_inference_steps = 8,
|
| 59 |
generator=torch.manual_seed(0),
|
| 60 |
+
true_cfg_scale=1.0, # Do not use standard CFG for Lightning LoRA
|
| 61 |
).images[0]
|
| 62 |
+
|
| 63 |
image.save("firered_image_edit_fewsteps.png")
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## Citation
|
| 67 |
+
|
| 68 |
+
If you find this work useful, please consider citing:
|
| 69 |
+
|
| 70 |
+
```bibtex
|
| 71 |
+
@article{firered2026rededit,
|
| 72 |
+
title={FireRed-Image-Edit-1.0 Technical Report},
|
| 73 |
+
author={Super Intelligence Team},
|
| 74 |
+
year={2026},
|
| 75 |
+
archivePrefix={arXiv},
|
| 76 |
+
primaryClass={cs.CV},
|
| 77 |
+
url={https://arxiv.org/abs/2602.13344},
|
| 78 |
+
}
|
| 79 |
```
|