Instructions to use peteromallet/Qwen-Image-Edit-InStyle with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use peteromallet/Qwen-Image-Edit-InStyle 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("Qwen/Qwen-Image-Edit", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("peteromallet/Qwen-Image-Edit-InStyle") 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
- Local Apps
- Draw Things
add library tag + inference example
#2
by linoyts HF Staff - opened
README.md
CHANGED
|
@@ -11,6 +11,7 @@ tags:
|
|
| 11 |
- style-transfer
|
| 12 |
- qwen
|
| 13 |
pipeline_tag: image-to-image
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
# QwenEdit InStyle LoRA
|
|
@@ -32,6 +33,18 @@ And then describe what you want to generate.
|
|
| 32 |
For example:
|
| 33 |
`Make an image in this style of a serene mountain landscape at sunset.`
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
### Strengths & Weaknesses
|
| 36 |
|
| 37 |
The model excels at:
|
|
|
|
| 11 |
- style-transfer
|
| 12 |
- qwen
|
| 13 |
pipeline_tag: image-to-image
|
| 14 |
+
library_name: diffusers
|
| 15 |
---
|
| 16 |
|
| 17 |
# QwenEdit InStyle LoRA
|
|
|
|
| 33 |
For example:
|
| 34 |
`Make an image in this style of a serene mountain landscape at sunset.`
|
| 35 |
|
| 36 |
+
### use with diffusers
|
| 37 |
+
|
| 38 |
+
```
|
| 39 |
+
import torch
|
| 40 |
+
from diffusers import QwenImageEditPipeline
|
| 41 |
+
|
| 42 |
+
pipe = QwenImageEditPipeline.from_pretrained("Qwen/Qwen-Image-Edit", torch_dtype=torch.bfloat16)
|
| 43 |
+
pipe.to("cuda")
|
| 44 |
+
|
| 45 |
+
pipe.load_lora_weights("peteromallet/Qwen-Image-Edit-InStyle", weight_name="InStyle-0.5.safetensors")
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
### Strengths & Weaknesses
|
| 49 |
|
| 50 |
The model excels at:
|