Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f48a47b
remove attributes and add all missing sub processors to their auto cl…
yonigozlan Oct 15, 2025
d5d5c58
remove all mentions of .attributes
yonigozlan Oct 15, 2025
dd505b5
cleanup
yonigozlan Oct 15, 2025
6a1448f
fix processor tests
yonigozlan Oct 15, 2025
a292900
fix modular
yonigozlan Oct 15, 2025
63a255d
remove last attributes
yonigozlan Oct 16, 2025
ef73759
fixup
yonigozlan Oct 16, 2025
b5e8b2e
Merge remote-tracking branch 'upstream/main' into remove-attributes-f…
yonigozlan Oct 16, 2025
f14ff3c
fixes after merge
yonigozlan Oct 16, 2025
0306430
fix wrong tokenizer in auto florence2
yonigozlan Oct 16, 2025
01cb815
fix missing audio_processor + nits
yonigozlan Oct 17, 2025
49ec906
Override __init__ in NewProcessor and change hf-internal-testing-repo…
yonigozlan Oct 17, 2025
7dd5682
Merge remote-tracking branch 'upstream/main' into remove-attributes-f…
yonigozlan Oct 17, 2025
946cc5c
fix auto tokenizer test
yonigozlan Oct 17, 2025
b0cb3e0
add init to markup_lm
yonigozlan Oct 17, 2025
3b9e846
update CustomProcessor in custom_processing
yonigozlan Oct 17, 2025
53de7a4
remove print
yonigozlan Oct 17, 2025
93d2c4d
Merge branch 'main' into remove-attributes-from-processors
yonigozlan Oct 17, 2025
feeec28
Merge remote-tracking branch 'upstream/main' into remove-attributes-f…
yonigozlan Oct 22, 2025
4a6b080
nit
yonigozlan Oct 22, 2025
02402a0
Merge branch 'remove-attributes-from-processors' of https://github.co…
yonigozlan Oct 22, 2025
757e1f1
fix test modeling owlv2
yonigozlan Oct 22, 2025
bf763b2
fix test_processing_layoutxlm
yonigozlan Oct 22, 2025
0799a0a
Fix owlv2, wav2vec2, markuplm, voxtral issues
yonigozlan Oct 22, 2025
bf1a4b6
Merge remote-tracking branch 'upstream/main' into remove-attributes-f…
yonigozlan Oct 31, 2025
e3f130d
add support for loading and saving multiple tokenizer natively
yonigozlan Oct 31, 2025
cc45a7e
remove exclude_attributes from save_pretrained
yonigozlan Oct 31, 2025
8979645
modifs after review
yonigozlan Nov 7, 2025
6cc30f9
Merge remote-tracking branch 'upstream/main' into remove-attributes-f…
yonigozlan Nov 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/transformers/models/align/processing_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ class AlignProcessor(ProcessorMixin):

"""

attributes = ["image_processor", "tokenizer"]
image_processor_class = "EfficientNetImageProcessor"
tokenizer_class = ("BertTokenizer", "BertTokenizerFast")
valid_processor_kwargs = AlignProcessorKwargs

def __init__(self, image_processor, tokenizer):
Expand Down
4 changes: 0 additions & 4 deletions src/transformers/models/altclip/processing_altclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ class AltCLIPProcessor(ProcessorMixin):
The tokenizer is a required input.
"""

attributes = ["image_processor", "tokenizer"]
image_processor_class = ("CLIPImageProcessor", "CLIPImageProcessorFast")
tokenizer_class = ("XLMRobertaTokenizer", "XLMRobertaTokenizerFast")

@deprecate_kwarg(old_name="feature_extractor", version="5.0.0", new_name="image_processor")
def __init__(self, image_processor=None, tokenizer=None):
super().__init__(image_processor, tokenizer)
Expand Down
4 changes: 0 additions & 4 deletions src/transformers/models/aria/modular_aria.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,10 +906,6 @@ class AriaProcessor(ProcessorMixin):
A dictionary indicating size conversions for images.
"""

attributes = ["image_processor", "tokenizer"]
image_processor_class = "AriaImageProcessor"
tokenizer_class = "AutoTokenizer"

def __init__(
self,
image_processor=None,
Expand Down
4 changes: 0 additions & 4 deletions src/transformers/models/aria/processing_aria.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ class AriaProcessor(ProcessorMixin):
A dictionary indicating size conversions for images.
"""

attributes = ["image_processor", "tokenizer"]
image_processor_class = "AriaImageProcessor"
tokenizer_class = "AutoTokenizer"

def __init__(
self,
image_processor=None,
Expand Down
1 change: 1 addition & 0 deletions src/transformers/models/auto/configuration_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
("layoutlm", "LayoutLMConfig"),
("layoutlmv2", "LayoutLMv2Config"),
("layoutlmv3", "LayoutLMv3Config"),
("layoutxlm", "LayoutLMv2Config"),
("led", "LEDConfig"),
("levit", "LevitConfig"),
("lfm2", "Lfm2Config"),
Expand Down
8 changes: 8 additions & 0 deletions src/transformers/models/auto/feature_extraction_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
("audio-spectrogram-transformer", "ASTFeatureExtractor"),
("clap", "ClapFeatureExtractor"),
("clvp", "ClvpFeatureExtractor"),
("csm", "EncodecFeatureExtractor"),
("dac", "DacFeatureExtractor"),
("data2vec-audio", "Wav2Vec2FeatureExtractor"),
("dia", "DiaFeatureExtractor"),
Expand All @@ -49,14 +50,20 @@
("granite_speech", "GraniteSpeechFeatureExtractor"),
("hubert", "Wav2Vec2FeatureExtractor"),
("kyutai_speech_to_text", "KyutaiSpeechToTextFeatureExtractor"),
("markuplm", "MarkupLMFeatureExtractor"),
("mctct", "MCTCTFeatureExtractor"),
("mimi", "EncodecFeatureExtractor"),
("moonshine", "Wav2Vec2FeatureExtractor"),
("moshi", "EncodecFeatureExtractor"),
("musicgen", "EncodecFeatureExtractor"),
("musicgen_melody", "MusicgenMelodyFeatureExtractor"),
("parakeet_ctc", "ParakeetFeatureExtractor"),
("parakeet_encoder", "ParakeetFeatureExtractor"),
("phi4_multimodal", "Phi4MultimodalFeatureExtractor"),
("pop2piano", "Pop2PianoFeatureExtractor"),
("qwen2_5_omni", "WhisperFeatureExtractor"),
("qwen2_audio", "WhisperFeatureExtractor"),
("qwen3_omni_moe", "WhisperFeatureExtractor"),
("seamless_m4t", "SeamlessM4TFeatureExtractor"),
("seamless_m4t_v2", "SeamlessM4TFeatureExtractor"),
("sew", "Wav2Vec2FeatureExtractor"),
Expand All @@ -66,6 +73,7 @@
("unispeech", "Wav2Vec2FeatureExtractor"),
("unispeech-sat", "Wav2Vec2FeatureExtractor"),
("univnet", "UnivNetFeatureExtractor"),
("voxtral", "WhisperFeatureExtractor"),
("wav2vec2", "Wav2Vec2FeatureExtractor"),
("wav2vec2-bert", "Wav2Vec2FeatureExtractor"),
("wav2vec2-conformer", "Wav2Vec2FeatureExtractor"),
Expand Down
14 changes: 14 additions & 0 deletions src/transformers/models/auto/image_processing_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
("aimv2", ("CLIPImageProcessor", "CLIPImageProcessorFast")),
("aimv2_vision_model", ("CLIPImageProcessor", "CLIPImageProcessorFast")),
("align", ("EfficientNetImageProcessor", "EfficientNetImageProcessorFast")),
("altclip", ("CLIPImageProcessor", "CLIPImageProcessorFast")),
("aria", ("AriaImageProcessor", None)),
("aya_vision", ("GotOcr2ImageProcessor", "GotOcr2ImageProcessorFast")),
("beit", ("BeitImageProcessor", "BeitImageProcessorFast")),
("bit", ("BitImageProcessor", "BitImageProcessorFast")),
("blip", ("BlipImageProcessor", "BlipImageProcessorFast")),
Expand All @@ -73,6 +75,8 @@
("clip", ("CLIPImageProcessor", "CLIPImageProcessorFast")),
("clipseg", ("ViTImageProcessor", "ViTImageProcessorFast")),
("cohere2_vision", (None, "Cohere2VisionImageProcessorFast")),
("colpali", ("SiglipImageProcessor", "SiglipImageProcessorFast")),
("colqwen2", ("Qwen2VLImageProcessor", "Qwen2VLImageProcessorFast")),
("conditional_detr", ("ConditionalDetrImageProcessor", "ConditionalDetrImageProcessorFast")),
("convnext", ("ConvNextImageProcessor", "ConvNextImageProcessorFast")),
("convnextv2", ("ConvNextImageProcessor", "ConvNextImageProcessorFast")),
Expand All @@ -95,8 +99,10 @@
("efficientformer", ("EfficientFormerImageProcessor", None)),
("efficientloftr", ("EfficientLoFTRImageProcessor", "EfficientLoFTRImageProcessorFast")),
("efficientnet", ("EfficientNetImageProcessor", "EfficientNetImageProcessorFast")),
("emu3", ("Emu3ImageProcessor", None)),
("eomt", ("EomtImageProcessor", "EomtImageProcessorFast")),
("flava", ("FlavaImageProcessor", "FlavaImageProcessorFast")),
("florence2", ("CLIPImageProcessor", "CLIPImageProcessorFast")),
("focalnet", ("BitImageProcessor", "BitImageProcessorFast")),
("fuyu", ("FuyuImageProcessor", "FuyuImageProcessorFast")),
("gemma3", ("Gemma3ImageProcessor", "Gemma3ImageProcessorFast")),
Expand All @@ -114,11 +120,13 @@
("ijepa", ("ViTImageProcessor", "ViTImageProcessorFast")),
("imagegpt", ("ImageGPTImageProcessor", "ImageGPTImageProcessorFast")),
("instructblip", ("BlipImageProcessor", "BlipImageProcessorFast")),
("internvl", ("GotOcr2ImageProcessor", "GotOcr2ImageProcessorFast")),
("janus", ("JanusImageProcessor", "JanusImageProcessorFast")),
("kosmos-2", ("CLIPImageProcessor", "CLIPImageProcessorFast")),
("kosmos-2.5", ("Kosmos2_5ImageProcessor", "Kosmos2_5ImageProcessorFast")),
("layoutlmv2", ("LayoutLMv2ImageProcessor", "LayoutLMv2ImageProcessorFast")),
("layoutlmv3", ("LayoutLMv3ImageProcessor", "LayoutLMv3ImageProcessorFast")),
("layoutxlm", ("LayoutLMv2ImageProcessor", "LayoutLMv2ImageProcessor")),
("levit", ("LevitImageProcessor", "LevitImageProcessorFast")),
("lfm2_vl", (None, "Lfm2VlImageProcessorFast")),
("lightglue", ("LightGlueImageProcessor", "LightGlueImageProcessorFast")),
Expand All @@ -141,6 +149,7 @@
("mobilevitv2", ("MobileViTImageProcessor", "MobileViTImageProcessorFast")),
("nat", ("ViTImageProcessor", "ViTImageProcessorFast")),
("nougat", ("NougatImageProcessor", "NougatImageProcessorFast")),
("omdet-turbo", ("DetrImageProcessor", "DetrImageProcessorFast")),
("oneformer", ("OneFormerImageProcessor", "OneFormerImageProcessorFast")),
("ovis2", ("Ovis2ImageProcessor", "Ovis2ImageProcessorFast")),
("owlv2", ("Owlv2ImageProcessor", "Owlv2ImageProcessorFast")),
Expand All @@ -155,14 +164,17 @@
("prompt_depth_anything", ("PromptDepthAnythingImageProcessor", "PromptDepthAnythingImageProcessorFast")),
("pvt", ("PvtImageProcessor", "PvtImageProcessorFast")),
("pvt_v2", ("PvtImageProcessor", "PvtImageProcessorFast")),
("qwen2_5_omni", ("Qwen2VLImageProcessor", "Qwen2VLImageProcessorFast")),
("qwen2_5_vl", ("Qwen2VLImageProcessor", "Qwen2VLImageProcessorFast")),
("qwen2_vl", ("Qwen2VLImageProcessor", "Qwen2VLImageProcessorFast")),
("qwen3_omni_moe", ("Qwen2VLImageProcessor", "Qwen2VLImageProcessorFast")),
("qwen3_vl", ("Qwen2VLImageProcessor", "Qwen2VLImageProcessorFast")),
("regnet", ("ConvNextImageProcessor", "ConvNextImageProcessorFast")),
("resnet", ("ConvNextImageProcessor", "ConvNextImageProcessorFast")),
("rt_detr", ("RTDetrImageProcessor", "RTDetrImageProcessorFast")),
("sam", ("SamImageProcessor", "SamImageProcessorFast")),
("sam2", (None, "Sam2ImageProcessorFast")),
("sam2_video", (None, "Sam2ImageProcessorFast")),
("sam_hq", ("SamImageProcessor", "SamImageProcessorFast")),
("segformer", ("SegformerImageProcessor", "SegformerImageProcessorFast")),
("seggpt", ("SegGptImageProcessor", None)),
Expand All @@ -180,12 +192,14 @@
("textnet", ("TextNetImageProcessor", "TextNetImageProcessorFast")),
("timesformer", ("VideoMAEImageProcessor", None)),
("timm_wrapper", ("TimmWrapperImageProcessor", None)),
("trocr", ("ViTImageProcessor", "ViTImageProcessorFast")),
("tvlt", ("TvltImageProcessor", None)),
("tvp", ("TvpImageProcessor", "TvpImageProcessorFast")),
("udop", ("LayoutLMv3ImageProcessor", "LayoutLMv3ImageProcessorFast")),
("upernet", ("SegformerImageProcessor", "SegformerImageProcessorFast")),
("van", ("ConvNextImageProcessor", "ConvNextImageProcessorFast")),
("video_llama_3", ("VideoLlama3ImageProcessor", "VideoLlama3ImageProcessorFast")),
("video_llava", ("VideoLlavaImageProcessor", None)),
("videomae", ("VideoMAEImageProcessor", None)),
("vilt", ("ViltImageProcessor", "ViltImageProcessorFast")),
("vipllava", ("CLIPImageProcessor", "CLIPImageProcessorFast")),
Expand Down
1 change: 1 addition & 0 deletions src/transformers/models/auto/processing_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
("mllama", "MllamaProcessor"),
("mm-grounding-dino", "GroundingDinoProcessor"),
("moonshine", "Wav2Vec2Processor"),
("omdet-turbo", "OmDetTurboProcessor"),
("oneformer", "OneFormerProcessor"),
("ovis2", "Ovis2Processor"),
("owlv2", "Owlv2Processor"),
Expand Down
Loading
Loading