I am having the same problem. TWRP reboots while flashing xiaomi.eu 6.12.1, just after the MD5 check. Tried to format data and wipe data, cache, dalvik, internal storage and system. Same problem. I bet the problem is with partition "cust", I could't even back that one up in TWRP.
I started from...