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
FireRedTeam commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,7 +23,7 @@ from diffusers import QwenImageEditPlusPipeline
|
|
| 23 |
import torch
|
| 24 |
from PIL import Image
|
| 25 |
|
| 26 |
-
pipe =
|
| 27 |
"FireRedTeam/FireRed-Image-Edit-1.0", torch_dtype=torch.bfloat16,
|
| 28 |
).to("cuda")
|
| 29 |
pipe.load_lora_weights(
|
|
@@ -36,7 +36,7 @@ input_image_raw = Image.open(input_image_path).convert('RGB')
|
|
| 36 |
|
| 37 |
image = pipe(
|
| 38 |
image = [input_image_raw],
|
| 39 |
-
prompt =
|
| 40 |
height = None,
|
| 41 |
width = None,
|
| 42 |
num_inference_steps = 8,
|
|
|
|
| 23 |
import torch
|
| 24 |
from PIL import Image
|
| 25 |
|
| 26 |
+
pipe = QwenImageEditPlusPipeline.from_pretrained(
|
| 27 |
"FireRedTeam/FireRed-Image-Edit-1.0", torch_dtype=torch.bfloat16,
|
| 28 |
).to("cuda")
|
| 29 |
pipe.load_lora_weights(
|
|
|
|
| 36 |
|
| 37 |
image = pipe(
|
| 38 |
image = [input_image_raw],
|
| 39 |
+
prompt = prompt,
|
| 40 |
height = None,
|
| 41 |
width = None,
|
| 42 |
num_inference_steps = 8,
|