Skip to content

fix: correct VaeImageProcessor.blur() docstring#14210

Open
sergioperezcheco wants to merge 1 commit into
huggingface:mainfrom
sergioperezcheco:fix/blur-docstring
Open

fix: correct VaeImageProcessor.blur() docstring#14210
sergioperezcheco wants to merge 1 commit into
huggingface:mainfrom
sergioperezcheco:fix/blur-docstring

Conversation

@sergioperezcheco

Copy link
Copy Markdown

What does this PR do?

Fixes the VaeImageProcessor.blur() docstring which had copy-pasted text from convert_to_grayscale().

Changes

  • Add missing blur_factor parameter to the Args section (was entirely absent from docstring)
  • Fix image arg description: was "The PIL image to convert to grayscale" → now "The input image to blur"
  • Fix Returns description: was "The grayscale-converted PIL image" → now "The blurred PIL image"

Before

def blur(image: PIL.Image.Image, blur_factor: int = 4) -> PIL.Image.Image:
    r"""
    Applies Gaussian blur to an image.

    Args:
        image (`PIL.Image.Image`):
            The PIL image to convert to grayscale.

    Returns:
        `PIL.Image.Image`:
            The grayscale-converted PIL image.
    """

After

def blur(image: PIL.Image.Image, blur_factor: int = 4) -> PIL.Image.Image:
    r"""
    Applies Gaussian blur to an image.

    Args:
        image (`PIL.Image.Image`):
            The input image to blur.
        blur_factor (`int`, *optional*, defaults to 4):
            The blur factor to apply. Higher values result in more blur.

    Returns:
        `PIL.Image.Image`:
            The blurred PIL image.
    """

Fixes #14209

@github-actions github-actions Bot added size/S PR with diff < 50 LOC fixes-issue labels Jul 17, 2026
- Add missing blur_factor parameter to Args section
- Fix image arg description (was copy-pasted from convert_to_grayscale)
- Fix Returns description to accurately describe blur behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixes-issue size/S PR with diff < 50 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VaeImageProcessor.blur() docstring is missing blur_factor and has a copy-pasted description

1 participant