I have the same problem.
i tried to update to miui ver 9 from 8.5.1.0 (which is miui 8 over android 7) but failed
i tried to update from dev ver 6.12.22 after checking that the BL is unlocked but failed
i tried to update from official 6.1.7 but failed
no matter what i try, installing any version...