[ProcessingIdefics] Attention mask bug with padding (#29449)
* Defaulted IdeficsProcessor padding to 'longest', removed manual padding * make fixup * Defaulted processor call to padding=False * Add padding to processor call in IdeficsModelIntegrationTest as well * Defaulted IdeficsProcessor padding to 'longest', removed manual padding * make fixup * Defaulted processor call to padding=False * Add padding to processor call in IdeficsModelIntegrationTest as well * redefaulted padding=longest again * fixup/doc
This commit is contained in:
@@ -656,7 +656,7 @@ class IdeficsModelIntegrationTest(TestCasePlus):
|
||||
"HuggingFaceM4/idefics-9b", quantization_config=quantization_config, device_map="auto"
|
||||
)
|
||||
processor = self.default_processor
|
||||
inputs = processor(prompts, return_tensors="pt").to(torch_device)
|
||||
inputs = processor(prompts, return_tensors="pt", padding="longest").to(torch_device)
|
||||
generated_ids = model.generate(**inputs, max_length=100)
|
||||
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user