Skip to content

Commit

Permalink
remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaizzy committed Jun 7, 2024
1 parent db6b758 commit ff9e4c3
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions mlx_vlm/models/multi_modality/sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ def resize_image(image_np, new_size=(96, 96), order=1):
return mx.array(resized_image_np)[None, :]


# Example usage:
# Assume first_global_feature is your input numpy array with shape (64, original_height, original_width)
# resized_image = resize_image_64_channels(first_global_feature, new_size=(96, 96))


# This class and its supporting functions below lightly adapted from the ViTDet backbone available at: https://github.com/facebookresearch/detectron2/blob/main/detectron2/modeling/backbone/vit.py # noqa
class SAMEncoder(nn.Module):
def __init__(
self,
Expand Down Expand Up @@ -370,11 +364,6 @@ def do_attention(q, k, v):
return x


from typing import Tuple

import numpy as np


def window_partition(
x: np.ndarray, window_size: int
) -> Tuple[np.ndarray, Tuple[int, int]]:
Expand Down

0 comments on commit ff9e4c3

Please sign in to comment.