ariG23498 HF Staff commited on
Commit
6fc1fc8
·
verified ·
1 Parent(s): 16d2005

Upload AmirKerr_ThisPerson_0.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. AmirKerr_ThisPerson_0.txt +40 -0
AmirKerr_ThisPerson_0.txt ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 = "Turn this cat into a dog"
11
+ input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
12
+
13
+ image = pipe(image=input_image, prompt=prompt).images[0]
14
+ ```
15
+
16
+ ERROR:
17
+ Traceback (most recent call last):
18
+ File "/tmp/AmirKerr_ThisPerson_0HSEzhi.py", line 28, in <module>
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)
22
+ File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 833, in from_pretrained
23
+ cached_folder = cls.download(
24
+ pretrained_model_name_or_path,
25
+ ...<14 lines>...
26
+ **kwargs,
27
+ )
28
+ File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
29
+ return fn(*args, **kwargs)
30
+ File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 1548, in download
31
+ pipeline_class = _get_pipeline_class(
32
+ cls,
33
+ ...<7 lines>...
34
+ revision=custom_revision,
35
+ )
36
+ File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 491, in _get_pipeline_class
37
+ pipeline_cls = getattr(diffusers_module, class_name)
38
+ File "/tmp/.cache/uv/environments-v2/fb0cca71682e9da2/lib/python3.13/site-packages/diffusers/utils/import_utils.py", line 946, in __getattr__
39
+ raise AttributeError(f"module {self.__name__} has no attribute {name}")
40
+ AttributeError: module diffusers has no attribute QwenImageEditPlusPipeline. Did you mean: 'QwenImageEditPipeline'?