Fix AutoVideoProcessor class lookup when torchvision is unavailable#43989
Fix AutoVideoProcessor class lookup when torchvision is unavailable#43989Abhijeetsingh610 wants to merge 2 commits intohuggingface:mainfrom
Conversation
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto |
|
Hi, Does this PR also solve this issue: huggingface/diffusers#13140 (comment) ? Thanks |
|
Thanks for checking. Yes, this PR addresses the same root cause as huggingface/diffusers#13140. |
|
@christopher5106 note that the root cause for the crash is you not having torchvision installed. If your model requires a video processor it will not work since this will not create one. If the video processor is optional this might solve your issue. |
|
@Frojdholm the bug appears on an image model, Qwen-Image and Qwen-Image-Edit. In that case, there is no video in inputs and outputs. |
What does this PR do?
Fixes a crash in
AutoVideoProcessorwhentorchvisionis unavailable.VIDEO_PROCESSOR_MAPPING_NAMEScan containNone, andvideo_processor_class_from_namewas doingif class_name in extractors, which raisesTypeErrorforNone.This PR:
Noneentries invideo_processor_class_from_nametests/models/auto/test_video_processing_auto.pyFixes #43986 #43986