Skip to content

Commit

Permalink
feat: support APISR
Browse files Browse the repository at this point in the history
  • Loading branch information
Tohrusky committed Oct 7, 2024
1 parent 0b1b234 commit 012e86b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ccrestoration/model/tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def calculate_pad_img_size(width: int, height: int, tile: Tuple[int, int], tile_
:param tile_pad: The padding size for each tile
:return: The size of the padded image as a tuple (padded_width, padded_height)
"""
pad_w = math.ceil(min(tile[0] + 2 * tile_pad, width) / 8) * 8
pad_h = math.ceil(min(tile[1] + 2 * tile_pad, height) / 8) * 8
pad_w = math.ceil(min(tile[0] + 2 * tile_pad, width) / tile_pad) * tile_pad
pad_h = math.ceil(min(tile[1] + 2 * tile_pad, height) / tile_pad) * tile_pad

return pad_w, pad_h

Expand Down

0 comments on commit 012e86b

Please sign in to comment.