Upload AmirKerr_ThisPerson_0.txt with huggingface_hub
Browse files
AmirKerr_ThisPerson_0.txt
CHANGED
|
@@ -1,21 +1,22 @@
|
|
| 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 |
pipe.load_lora_weights("AmirKerr/ThisPerson")
|
| 9 |
|
| 10 |
-
prompt = "
|
| 11 |
-
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/
|
| 12 |
|
| 13 |
-
image = pipe(image=input_image, prompt=prompt).
|
|
|
|
| 14 |
```
|
| 15 |
|
| 16 |
ERROR:
|
| 17 |
Traceback (most recent call last):
|
| 18 |
-
File "/tmp/
|
| 19 |
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509", dtype=torch.bfloat16, device_map="cuda")
|
| 20 |
File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
|
| 21 |
return fn(*args, **kwargs)
|
|
|
|
| 1 |
```CODE:
|
| 2 |
import torch
|
| 3 |
from diffusers import DiffusionPipeline
|
| 4 |
+
from diffusers.utils import load_image, export_to_video
|
| 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 |
pipe.load_lora_weights("AmirKerr/ThisPerson")
|
| 9 |
|
| 10 |
+
prompt = "A man with short gray hair plays a red electric guitar."
|
| 11 |
+
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png")
|
| 12 |
|
| 13 |
+
image = pipe(image=input_image, prompt=prompt).frames[0]
|
| 14 |
+
export_to_video(output, "output.mp4")
|
| 15 |
```
|
| 16 |
|
| 17 |
ERROR:
|
| 18 |
Traceback (most recent call last):
|
| 19 |
+
File "/tmp/AmirKerr_ThisPerson_0LPolgF.py", line 28, in <module>
|
| 20 |
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509", dtype=torch.bfloat16, device_map="cuda")
|
| 21 |
File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
|
| 22 |
return fn(*args, **kwargs)
|