You will first have to ensure that Emperor Komei doesn't get killed during the Kinmon Incident.It's unknown as to which party actually killed the Emperor(although some conspiracy theorists believes that the Shogunate killed him themselves to blame the Chosu Clan),most likely due to a misfire,but after this incident support for Sonno Joi decreased dramatically and the emperor's successor,Mutsuhito,was taken directly to Edo under the direct surveillance of the Bakufu.Perhaps without the Emperor being killed,the Shogunate could be deposed rapidly with various anti-Shogunate forces being united under the banner of the Emperor.Instead,with the Emperor was killed,when the Boshin War finally broke out,the anti-Shogunate forces were forced to proclaim Prince Komatsu Akihito regent and rally around him.Without the Emperor as well as accusations that they have committed deicide,the rebellion was a complete mess.If it wasn't for the fact that many rebel leaders,such as Saigo Takamori being excellent commanders,on top of the fact that Satsuma forces were in general better trained and equipped than the Shogunate forces,the rebellion would have been over within a year.The subsequent stalemate drastically weakened both the authority of the Shogunate over it's remaining vassals as well as the unity of the anti-Shogunate forces.Within ten years after the outbreak of the rebellion,both the Shogunate lords and anti-Shogunate lords began fighting amongst each other,irrespective of whether they were loyal to the Shogun or to the Emperor originally.