1. Go to stock recovery (power key + volume up) wipe data.
2. Put your phone in fastboot and install twrp.
3. Copy rom with adb push command.
4. Install rom via twrp
1. You reinstall the stock rom with Miflash.
2. Boot into MIUI and set the device password.
3. Install TWRP according to the instructions in this article.
4. Install stable rom xiaomi.eu