Upload Qwen_Qwen-Image-Edit-2509_0.txt with huggingface_hub
Browse files
Qwen_Qwen-Image-Edit-2509_0.txt
CHANGED
|
@@ -1,8 +1,10 @@
|
|
| 1 |
```CODE:
|
|
|
|
| 2 |
from diffusers import DiffusionPipeline
|
| 3 |
from diffusers.utils import load_image
|
| 4 |
|
| 5 |
-
|
|
|
|
| 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")
|
|
@@ -12,8 +14,8 @@ image = pipe(image=input_image, prompt=prompt).images[0]
|
|
| 12 |
|
| 13 |
ERROR:
|
| 14 |
Traceback (most recent call last):
|
| 15 |
-
File "/tmp/Qwen_Qwen-Image-Edit-
|
| 16 |
-
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509")
|
| 17 |
File "/tmp/.cache/uv/environments-v2/cec8eac0e2e692b8/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
|
| 18 |
return fn(*args, **kwargs)
|
| 19 |
File "/tmp/.cache/uv/environments-v2/cec8eac0e2e692b8/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 833, in from_pretrained
|
|
|
|
| 1 |
```CODE:
|
| 2 |
+
import torch
|
| 3 |
from diffusers import DiffusionPipeline
|
| 4 |
from diffusers.utils import load_image
|
| 5 |
|
| 6 |
+
# switch to "mps" for apple devices
|
| 7 |
+
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509", dtype=torch.bfloat16, device_map="cuda")
|
| 8 |
|
| 9 |
prompt = "Turn this cat into a dog"
|
| 10 |
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
|
|
|
|
| 14 |
|
| 15 |
ERROR:
|
| 16 |
Traceback (most recent call last):
|
| 17 |
+
File "/tmp/Qwen_Qwen-Image-Edit-2509_0lcExz5.py", line 26, in <module>
|
| 18 |
+
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509", dtype=torch.bfloat16, device_map="cuda")
|
| 19 |
File "/tmp/.cache/uv/environments-v2/cec8eac0e2e692b8/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
|
| 20 |
return fn(*args, **kwargs)
|
| 21 |
File "/tmp/.cache/uv/environments-v2/cec8eac0e2e692b8/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 833, in from_pretrained
|