Skip to content

Conversation

@MilkClouds
Copy link
Contributor

What does this PR do?

This PR fixes several issues in the auto processing modules:

  1. Fixes AutoImageProcessor.register bug: Removes incorrect validation logic that was copied from tokenizers. The validation checked for slow_image_processor_class attribute consistency, but fast image processors don't have this attribute (unlike fast tokenizers), causing the register method to fail when registering custom image processors.

  2. Fixes documentation errors: Corrects copy-paste errors in docstrings where "tokenizer" was incorrectly used instead of the appropriate processor type (feature extractor, image processor, video processor).

  3. Fixes typos: Corrects "fine" → "find" in comments across multiple auto modules.

  4. Improves AutoVideoProcessor trust handling: Adds proper upstream repository extraction from video_processor_auto_map when resolving trust_remote_code.

Changes by file:

  • feature_extraction_auto.py: Fixed typo and corrected docstring to reference feature extractors instead of tokenizers
  • image_processing_auto.py: Removed incorrect slow_image_processor_class validation and fixed import in docstring example
  • processing_auto.py: Fixed typo in comment
  • tokenization_auto.py: Fixed typo in comment
  • video_processing_auto.py: Fixed docstring reference and added upstream repo handling for trust_remote_code

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@ArthurZucker @Rocketknight1 (auto modules and processing)

@github-actions
Copy link
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: auto

@MilkClouds
Copy link
Contributor Author

For reviewer's information: this PR is ready for review!

@Rocketknight1
Copy link
Member

This is definitely one for @zucchini-nlp, but you might need to wait until she's back!

Copy link
Member

@zucchini-nlp zucchini-nlp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@zucchini-nlp zucchini-nlp enabled auto-merge (squash) November 6, 2025 07:34
@zucchini-nlp zucchini-nlp merged commit 32e49f2 into huggingface:main Nov 6, 2025
23 checks passed
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Abdennacer-Badaoui pushed a commit to Abdennacer-Badaoui/transformers that referenced this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants