AttributeError: module transformers has no attribute CLIPImageProcessor
when I run your code without any modification, it has a bug like this:
Cell In[2], line 19
16 mask_image = process_image(mask_path).resize((512, 512))
17 example_image = process_image(ref_path).resize((512, 512))
---> 19 pipe = DiffusionPipeline.from_pretrained(
20 "Fantasy-Studio/Paint-by-Example",
21 torch_dtype=torch.float16,
22 )
23 pipe = pipe.to("cuda")
25 image = pipe(image=init_image, mask_image=mask_image, example_image=example_image).images[0]
File ~/miniconda3/envs/Paint-by-Example/lib/python3.8/site-packages/diffusers/pipelines/pipeline_utils.py:683, in DiffusionPipeline.from_pretrained(cls, pretrained_model_name_or_path, **kwargs)
679 else:
680 # else we just import it from the library.
681 library = importlib.import_module(library_name)
--> 683 class_obj = getattr(library, class_name)
684 importable_classes = LOADABLE_CLASSES[library_name]
685 class_candidates = {c: getattr(library, c, None) for c in importable_classes.keys()}
File ~/miniconda3/envs/Paint-by-Example/lib/python3.8/site-packages/transformers/utils/import_utils.py:865, in _LazyModule.getattr(self, name)
863 value = getattr(module, name)
864 else:
--> 865 raise AttributeError(f"module {self.name} has no attribute {name}")
867 setattr(self, name, value)
868 return value
AttributeError: module transformers has no attribute CLIPImageProcessor