We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Related Issues and PR: #34307 #36184
transformers
@Rocketknight1
examples
Here are the reprodution steps
AttributeError
from transformers import Qwen2_5_VLProcessor, Qwen2_5_VLImageProcessor, Qwen2_5_VLForConditionalGeneration, Qwen2_5_VLConfig class NewProcessor(Qwen2_5_VLProcessor): image_processor_class = "NewImageProcessor" def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) class NewImageProcessor(Qwen2_5_VLImageProcessor): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) class NewConfig(Qwen2_5_VLConfig): model_type = "new_model" class NewModel(Qwen2_5_VLForConditionalGeneration): config_class = NewConfig def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) from transformers import AutoModel, AutoImageProcessor, AutoProcessor AutoImageProcessor.register(NewModel.config_class, NewImageProcessor) AutoProcessor.register(NewModel.config_class, NewProcessor) AutoModel.register(NewModel.config_class, NewModel) if __name__ == "__main__": processor = NewProcessor.from_pretrained("path/to/NewModel_config/")
modified config
config.json: "architectures": [ "NewModel" ], "model_type": "new_model", preprocessor_config.json: "image_processor_type": "NewImageProcessor", "processor_class": "NewProcessor"
I also check the pr #36184, it didn't work, because the func _get_class_from_class_name use mapping but the key is string rather than Config class
None
The text was updated successfully, but these errors were encountered:
Update processing_utils.py
7c47616
Fix huggingface#36194
fix by #36184
Sorry, something went wrong.
No branches or pull requests
System Info
Related Issues and PR: #34307 #36184
transformers
version: 4.49.0.dev0Who can help?
@Rocketknight1
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Here are the reprodution steps
AttributeError
#34307modified config
I also check the pr #36184, it didn't work, because the func _get_class_from_class_name use mapping but the key is string rather than Config class
Expected behavior
None
The text was updated successfully, but these errors were encountered: