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!

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.

2 participants