Not quite. The main negotiator they were using in the Soviet Union was fully aware of the reality of what was happening, long before the nukes and Soviet declaration of war. He was suggesting unconditional surrender except with the promise of the continuity of the Emperor, which is exactly what they ended up going for.
The problem is that he did not, independently, have the authority to make such an offer. And in the mainland things were also confused. The Emperor was treated as a borderline divine figure, but that also meant he was mostly hands off except as a lost resort. He was pushing for surrender behind the scenes, but the war council was the one making the decisions of what would be offered, and they were completely divided. Half wanted to fight, and half wanted peace.
This division continued even after the nukes and Soviet invasion. What changed is they chose to allow the Emperor to make the final call, and he chose to surrender as he had been angling for for quite some time already. The nukes played little role in this decision. The pro-war Japanese correctly believed that we couldn't have many such weapons and were, in any case, prepared to fight to the last Japanese because they thought it'd be glorious. The thing that did change their mind was the Soviets entering the war meaning they not only no longer had any intermediary with with which to hope for more favorable terms, but also were now facing a massive invasion from the north as well.