def calculate_overlap(self, width, height, base_overlap=128):
        """
        Calculates dynamic overlap based on the image's aspect ratio.

        Args:
            width (int): Width of the image in pixels.
            height (int): Height of the image in pixels.
            base_overlap (int, optional): Base overlap value in pixels. Defaults to 128.

        Returns:
            tuple: A tuple containing:
                - row_overlap (int): Overlap between tiles in consecutive rows.
                - col_overlap (int): Overlap between tiles in consecutive columns.
        """
        ratio = height / width
        if ratio < 1:  # Image is wider than tall
            return base_overlap // 2, base_overlap
        else:  # Image is taller than wide
            return base_overlap, base_overlap * 2

        Calculates dynamic overlap based on the image's aspect ratio.

        Args:
            width (int): Width of the image in pixels.
            height (int): Height of the image in pixels.
            base_overlap (int, optional): Base overlap value in pixels. Defaults to 128.

        Returns:
            tuple: A tuple containing:
                - row_overlap (int): Overlap between tiles in consecutive rows.
                - col_overlap (int): Overlap between tiles in consecutive columns.
        
examples/community/mod_controlnet_tile_sr_sdxl.py