transformers 5 refuses the Table Transformer v1.1 config because dilation is null
PitfallVerified 28 Sep 2026Holds transformers: 5:
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.
Symptom#
Loading microsoft/table-transformer-structure-recognition-v1.1-all fails:
huggingface_hub.errors.StrictDataclassFieldValidationError: Validation error for field 'dilation':
TypeError: Field 'dilation' expected bool, got NoneType (value: None)
Cause#
The model's config.json has "dilation": null. transformers 5 validates config fields strictly and dilation must be a bool.
Fix#
Load the config JSON, set dilation to false, and pass the config in:
=
=
=
= False
=
Evidence#
rait, 2026-09-26, transformers 5.17: the load failed with the error above; with the config fix it loaded and served as the reference for a Rust port (maximum output difference 5e-6).