From 1524b8330e374217f8ff744f82936e91159c6922 Mon Sep 17 00:00:00 2001 From: zhanluxianshen Date: Tue, 24 Dec 2024 06:25:47 +0800 Subject: [PATCH] Reuse "if not" logic in image_processing. --- src/transformers/image_processing_base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/transformers/image_processing_base.py b/src/transformers/image_processing_base.py index c5af652decf2a4..a6ce7af3fa8076 100644 --- a/src/transformers/image_processing_base.py +++ b/src/transformers/image_processing_base.py @@ -381,8 +381,6 @@ def get_image_processor_dict( logger.info( f"loading configuration file {image_processor_file} from cache at {resolved_image_processor_file}" ) - - if not is_local: if "auto_map" in image_processor_dict: image_processor_dict["auto_map"] = add_model_info_to_auto_map( image_processor_dict["auto_map"], pretrained_model_name_or_path @@ -391,6 +389,7 @@ def get_image_processor_dict( image_processor_dict["custom_pipelines"] = add_model_info_to_custom_pipelines( image_processor_dict["custom_pipelines"], pretrained_model_name_or_path ) + return image_processor_dict, kwargs @classmethod