mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Reuse "if not" logic in image_processing. (#35405)
This commit is contained in:
parent
30a9971632
commit
1fe2d53d4e
@ -381,8 +381,6 @@ class ImageProcessingMixin(PushToHubMixin):
|
||||
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 @@ class ImageProcessingMixin(PushToHubMixin):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user