We created a program to generate TEI facsimile elements from IIIF manifest files. You can try it in the following Google Colaboratory notebook:

colab.research.google.com

We hope this serves as a useful reference for those considering integration between IIIF and TEI.