The Emperor only changed its mind after the first atomic bomb drop on Hiroshima. The Big Six did not accept the American terns (Big Six wanted no invasion, wanted Japan to try its own war criminals, and wanted the Emperor to lead the country and answer to no-one). The Emperor gad to tell the council of Big Six that he already made up his mind to accept unconditional surrender and that he was going to tell Japan the very next day. Some military officers stormed the place trying to steal the radio recording of the Emperor. Army Minister Anami committed suicide because he could not bear to hear the radio address [2]
Japan military was geared to fight to the end on the main islands and dropping the atomic bombs was necessary to stop them. Dropping the bombs saved American lives, and maybe even some Japanese ones.
[0] https://en.wikipedia.org/wiki/Bombing_of_Tokyo#Operation_Mee...
[1] https://www.history.navy.mil/about-us/leadership/director/di...