AIUI India was industrialized during the longer war to serve as a second "Arsenal of Democracy".
Not sure exactly how Partition was avoided -- I remember reading something that self-determination provisos were only applied to territories that had suffered Axis occupation, but not sure exactly why the Allies made that decision...
The entire process of independence was vastly changed by the War. In addition to the establishment of real industrial capability and the beginning of wealth that came with it, the mover from colony to independent state was undertaken in a much more organized and carefully orchestrated manner. The increased wealth was accompanied by two really critical elements, greatly lowered unemployment and increased education of the population (which, in turn, led to improvements in industrial production, which led to more wealth which led to less unemployment in an on-going cycle.
The biggest difference was the recognized impact of what became a fully independent Indian Army, one that was entirely integrated and became a huge source of pride and a unifying influence across religious and caste lines, It is far from unique that the pressure cooker of war created a true "pan-Indian" identity while fighting an enemy that demonstrated just where unbridled bigotry led. (the same thing occurred with the U.S.)
India, however, remains somewhat fragile. The old religious and caste animosities still exist and there are plenty of unscrupulous wanna-be leaders who try to use them as a path to power. India will hang together as long as it remains a leading "1st World" economy. If that changes, and there is always that danger, with a return of serious unemployment and poverty, even for just a few years, that all those submerged divides may become exploitable (it is really hard to get a revolution going when folks all have cable TV, plenty of food, and good jobs in a stable economy, knock a couple of those props out and the $#%@ can hit the fan if the wrong political comes along).
So far, India has had good fortune, and there is no reason that it shouldn't continue short of some kind of natural or man-made disaster.