[feat] LlavaNext add feature size check to avoid CUDA Runtime Error (#33608)
* [feat] add feature size check to avoid CUDA Runtime Error * [minor] add error handling to all llava models * [minor] avoid nested if else * [minor] add error message to Qwen2-vl and chameleon * [fix] token dimension for check * [minor] add feature dim check for videos too * [fix] dimension check * [fix] test reference values --------- Co-authored-by: Raushan Turganbay <raushan@huggingface.co>
This commit is contained in:
@@ -111,8 +111,8 @@ class VipLlavaVisionText2TextModelTester:
|
||||
self.batch_size = 3
|
||||
self.num_channels = 3
|
||||
self.image_size = 336
|
||||
self.encoder_seq_length = 231
|
||||
self.num_image_tokens = 224
|
||||
self.encoder_seq_length = 232
|
||||
self.num_image_tokens = 225
|
||||
self.seq_length = seq_length + self.num_image_tokens
|
||||
|
||||
def get_config(self):
|
||||
|
||||
Reference in New Issue
Block a user