Instructions to use prithivMLmods/Qwen-Image-Edit-AIO-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use prithivMLmods/Qwen-Image-Edit-AIO-FP8 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("prithivMLmods/Qwen-Image-Edit-AIO-FP8", 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
|
@@ -35,4 +35,23 @@ transformers # - transformers@v4.57.6
|
|
| 35 |
torch # - torch@v2.9.1+cu128
|
| 36 |
diffusers # - diffusers@v0.37.0.dev0
|
| 37 |
accelerate # - accelerate@v1.12.0
|
| 38 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
torch # - torch@v2.9.1+cu128
|
| 36 |
diffusers # - diffusers@v0.37.0.dev0
|
| 37 |
accelerate # - accelerate@v1.12.0
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
## Qwen-Image-Edit-AIO-FP8 [Demo]
|
| 41 |
+
|
| 42 |
+
```py
|
| 43 |
+
import torch
|
| 44 |
+
from diffusers import QwenImageEditPipeline # or your compatible pipeline
|
| 45 |
+
|
| 46 |
+
model_path = "./Qwen-Image-Edit-AIO-FP8"
|
| 47 |
+
|
| 48 |
+
pipe = QwenImageEditPipeline.from_pretrained(
|
| 49 |
+
model_path,
|
| 50 |
+
torch_dtype=torch.bfloat16
|
| 51 |
+
)
|
| 52 |
+
|
| 53 |
+
pipe.to("cuda")
|
| 54 |
+
|
| 55 |
+
# Example usage
|
| 56 |
+
# outputs = pipe(image=input_image, prompt="Your edit prompt")
|
| 57 |
+
```
|