Error while using LILT model "index out of range in self"

I got the same issue, following the funsd tutorial notebook with my own dataset.

I just found that I have faulty bounding boxes in my data. Some input boxes (x0, y0, x1, y1) have x1 < x0 or y1 < y1. The height / width of these boxes would be negative and that seems to casue an error, at least that was reported for a similar issue with LayoutLM.

I will correct my dataset and post an update, if it solves the issue for me!