MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / blur

Method blur

src/diffusers/image_processor.py:165–171  ·  view source on GitHub ↗

Applies Gaussian blur to an image.

(image: PIL.Image.Image, blur_factor: int = 4)

Source from the content-addressed store, hash-verified

163
164 @staticmethod
165 def blur(image: PIL.Image.Image, blur_factor: int = 4) -> PIL.Image.Image:
166 """
167 Applies Gaussian blur to an image.
168 """
169 image = image.filter(ImageFilter.GaussianBlur(blur_factor))
170
171 return image
172
173 @staticmethod
174 def get_crop_region(mask_image: PIL.Image.Image, width: int, height: int, pad=0):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected