Unverified Commit c4df7c16 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Drop `feature_extractor_type` when loading an image processor file (#28195)



fix
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent bb3bd447
...@@ -75,6 +75,9 @@ class ImageProcessingMixin(PushToHubMixin): ...@@ -75,6 +75,9 @@ class ImageProcessingMixin(PushToHubMixin):
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Set elements of `kwargs` as attributes.""" """Set elements of `kwargs` as attributes."""
# This key was saved while we still used `XXXFeatureExtractor` for image processing. Now we use
# `XXXImageProcessor`, this attribute and its value are misleading.
kwargs.pop("feature_extractor_type", None)
# Pop "processor_class" as it should be saved as private attribute # Pop "processor_class" as it should be saved as private attribute
self._processor_class = kwargs.pop("processor_class", None) self._processor_class = kwargs.pop("processor_class", None)
# Additional attributes without default values # Additional attributes without default values
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment