Skip to content

Commit

Permalink
style post patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker committed Mar 21, 2024
1 parent a2a9516 commit f4364a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/transformers/image_processing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ def select_best_resolution(original_size: tuple, possible_resolutions: list) ->

return best_fit


ImageProcessingMixin.push_to_hub = copy_func(ImageProcessingMixin.push_to_hub)
if ImageProcessingMixin.push_to_hub.__doc__ is not None:
ImageProcessingMixin.push_to_hub.__doc__ = ImageProcessingMixin.push_to_hub.__doc__.format(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
make_list_of_images,
to_numpy_array,
valid_images,
validate_preprocess_arguments
validate_preprocess_arguments,
)
from ...utils import TensorType, is_vision_available, logging

Expand All @@ -51,7 +51,6 @@
from PIL import Image



def divide_to_patches(image: np.array, patch_size: int, input_data_format) -> List[np.array]:
"""
Divides an image into patches of a specified size.
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/models/llava_next/modeling_llava_next.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from ... import PreTrainedModel
from ...activations import ACT2FN
from ...cache_utils import Cache
from ...image_processing_utils import select_best_resolution
from ...modeling_outputs import ModelOutput
from ...utils import (
add_start_docstrings,
Expand All @@ -33,7 +34,6 @@
)
from ..auto import AutoModel, AutoModelForCausalLM
from .configuration_llava_next import LlavaNextConfig
from ...image_processing_utils import select_best_resolution


logger = logging.get_logger(__name__)
Expand Down

0 comments on commit f4364a6

Please sign in to comment.