diff --git a/lama_cleaner/model/sd.py b/lama_cleaner/model/sd.py index a10af76..49b68f5 100644 --- a/lama_cleaner/model/sd.py +++ b/lama_cleaner/model/sd.py @@ -50,7 +50,7 @@ class SD(InpaintModel): # https://huggingface.co/docs/diffusers/v0.7.0/en/api/pipelines/stable_diffusion#diffusers.StableDiffusionInpaintPipeline.enable_attention_slicing self.model.enable_attention_slicing() # https://huggingface.co/docs/diffusers/v0.7.0/en/optimization/fp16#memory-efficient-attention - if kwargs['sd_enable_xformers']: + if kwargs.get('sd_enable_xformers', False): self.model.enable_xformers_memory_efficient_attention() self.model = self.model.to(device) diff --git a/lama_cleaner/tests/result/paint_by_example_Original.png b/lama_cleaner/tests/result/paint_by_example_Original.png deleted file mode 100644 index 9fe40e4..0000000 Binary files a/lama_cleaner/tests/result/paint_by_example_Original.png and /dev/null differ diff --git a/lama_cleaner/tests/test_paint_by_example.py b/lama_cleaner/tests/test_paint_by_example.py index 476664f..4579b6f 100644 --- a/lama_cleaner/tests/test_paint_by_example.py +++ b/lama_cleaner/tests/test_paint_by_example.py @@ -21,7 +21,7 @@ def assert_equal( fx: float = 1, fy: float = 1, img_p=current_dir / "overture-creations-5sI6fQgYIuo.png", mask_p=current_dir / "overture-creations-5sI6fQgYIuo_mask.png", - example_p=current_dir / "rabbit.jpeg", + example_p=current_dir / "bunny.jpeg", ): img, mask = get_data(fx=fx, fy=fy, img_p=img_p, mask_p=mask_p)