From 1fe2d53d4ebdab22a7e30ed6de5816049898953d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B9=9B=E9=9C=B2=E5=85=88=E7=94=9F?= Date: Fri, 3 Jan 2025 21:44:57 +0800 Subject: [PATCH] Reuse "if not" logic in image_processing. (#35405) --- 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 c5af652decf..a6ce7af3fa8 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