I'm assuming that you have the latest fastboot ROM for your device and MiFlash downloaded.
1. Unzip the .tgz file(fastboot file) using any zip extractor and you should get a .tar file.
2. Unzip the .tar file and you should get a folder.
3. Now place the folder into a drive and not within folders. Example:- "E:\folder_name".
4. Open the folder and you should see a few .bat and .sh files. (image 1)
View attachment 3860603
5. Right click and edit the "flash_all.bat"(notepad++ prefered)(
[url]https://notepad-plus-plus.org/download/v6.9.2.html[/URL])
6. Add that this line as in the image shown(image 2)
View attachment 3860610
Code:
fastboot %* flash partition "%~dp0images\gpt_both0.bin" || @echo "Flash partition" && exit /B 1
7. Save the file and close it.
8. Open MiFlash, click on browse.
9. Navigate to where you saved your folder and select the images folder inside it and click OK. Example:- "E:\folder_name\images".
10. Click the dropdown arrow on the side of the "Browse" button and select "Advanced".
11. Now click on the browse button near the "FastBoot Script" field and navigate to the edited flash_all.bat. Example:-"E:\folder_name\flash_all.bat".
12. Click OK.
13. Boot your device into bootloader mode and connect it to your PC.
14. After connecting click the "Refresh" button and your device should appear.
15. Select it and press "Flash".
16. Wait patiently for the process to complete and your device should automatically reboot.
17. Hit the thanks button if it worked

Else I'll try to solve your problem