def METHOD_NAME(self, input):
    output = torch.zeros_like(input)  # [1, C, H, W]
    # determine crop_h and crop_w
    ih, iw = input.shape[-2:]
    crop_rows, crop_cols = max(ih // 512, 1), max(iw // 512, 1)
    overlap = 16
    step_h, step_w = ih // crop_rows, iw // crop_cols
    for y in range(crop_rows):
        for x in range(crop_cols):
            crop_y = step_h * y
            crop_x = step_w * x
            crop_h = step_h if y < crop_rows - 1 else ih - crop_y
            crop_w = step_w if x < crop_cols - 1 else iw - crop_x
            crop_frames = input[:, :,
                                max(0, crop_y - overlap
                                    ):min(crop_y + crop_h + overlap, ih),
                                max(0, crop_x - overlap
                                    ):min(crop_x + crop_w
                                          + overlap, iw)].contiguous()
            h_start = overlap if max(0, crop_y - overlap) > 0 else 0
            w_start = overlap if max(0, crop_x - overlap) > 0 else 0
            h_end = h_start + crop_h if min(crop_y + crop_h
                                            + overlap, ih) < ih else ih
            w_end = w_start + crop_w if min(crop_x + crop_w
                                            + overlap, iw) < iw else iw
            output[:, :, crop_y:crop_y + crop_h,
                   crop_x:crop_x + crop_w] = self.model(
                       crop_frames)[:, :, h_start:h_end,
                                    w_start:w_end].clamp(0, 1)
    return output