Upload Qwen_Qwen-Image-Edit_0.txt with huggingface_hub
Browse files- Qwen_Qwen-Image-Edit_0.txt +17 -0
Qwen_Qwen-Image-Edit_0.txt
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```CODE:
|
| 2 |
+
from diffusers import DiffusionPipeline
|
| 3 |
+
from diffusers.utils import load_image
|
| 4 |
+
|
| 5 |
+
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit")
|
| 6 |
+
|
| 7 |
+
prompt = "Turn this cat into a dog"
|
| 8 |
+
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
|
| 9 |
+
|
| 10 |
+
image = pipe(image=input_image, prompt=prompt).images[0]
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
ERROR:
|
| 14 |
+
Traceback (most recent call last):
|
| 15 |
+
File "/tmp/Qwen_Qwen-Image-Edit_02pxzJo.py", line 14, in <module>
|
| 16 |
+
from diffusers import DiffusionPipeline
|
| 17 |
+
ModuleNotFoundError: No module named 'diffusers'
|