| ```CODE: |
| import torch |
| from diffusers import DiffusionPipeline |
| from diffusers.utils import load_image, export_to_video |
|
|
| # switch to "mps" for apple devices |
| pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509", dtype=torch.bfloat16, device_map="cuda") |
| pipe.load_lora_weights("AmirKerr/ThisPerson") |
|
|
| prompt = "A man with short gray hair plays a red electric guitar." |
| input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png") |
|
|
| image = pipe(image=input_image, prompt=prompt).frames[0] |
| export_to_video(output, "output.mp4") |
| ``` |
|
|
| ERROR: |
| Traceback (most recent call last): |
| File "/tmp/AmirKerr_ThisPerson_0LPolgF.py", line 28, in <module> |
| pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509", dtype=torch.bfloat16, device_map="cuda") |
| File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn |
| return fn(*args, **kwargs) |
| File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 833, in from_pretrained |
| cached_folder = cls.download( |
| pretrained_model_name_or_path, |
| ...<14 lines>... |
| **kwargs, |
| ) |
| File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn |
| return fn(*args, **kwargs) |
| File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 1548, in download |
| pipeline_class = _get_pipeline_class( |
| cls, |
| ...<7 lines>... |
| revision=custom_revision, |
| ) |
| File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 491, in _get_pipeline_class |
| pipeline_cls = getattr(diffusers_module, class_name) |
| File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/diffusers/utils/import_utils.py", line 946, in __getattr__ |
| raise AttributeError(f"module {self.__name__} has no attribute {name}") |
| AttributeError: module diffusers has no attribute QwenImageEditPlusPipeline. Did you mean: 'QwenImageEditPipeline'? |
|
|