Being rational players of the game, neither India nor the US are going to attempt a direct annihilation of the Pakistani army. In that sense the Pakistani army has rightly assessed that its nuclear weapons are a true deterrent. It is not that India or the US are afraid of getting defeated, but the fear is starting a nuclear war with its horrendous consequences if it is avoidable. So a direct military threat to the Paki army is not on the cards unless they use a nuke first. But they are rational enough not to use a nuke on India or on US interests.
India does not want to see the Paki army stronger, but the US which has always supported an overly powerful Pakistani army as long as that army does the US's bidding. Until recently the Pakistani army has never been a threat to the US and the US typically arms and funds anyone who might help them if they are not seen as a threat. That is what they did to Iran after all.
But the Pakistanis have not been stupid.They outsourced their own work to irregular mufti militias. "Irregular" is the wrong term. They are regular Pakistani army-men in mufti(Kargil '99 and Kashmir '48 and '65). That way the Paki army could appear to be toeing the US line while the militias did what was needed to maintain Paki interests.
Paki army interests and jihadi interests are the same. And military threats have been neutralized by nuclear deterrence. Any non military threat to the Pakistani army from outsiders - such as cutting off funding or applying pressure on a particular border is countered by claiming that the jihadis are taking over and "Do you really want Pakistan to be occupied by jihadis". This is the same threat that is being made by Hudoodbhoy and Irfan Hussein in the Paki thread. That threat "Do you want jihadis to win" is swallowed hook line and sinker by the Americans. Luckily Indians do not fall for that. India knows that there is no difference between the Paki army and the Taliban. It is only a matter of time before the US catches on to this fact. The Pakistan army's real test of survival will come when that happens, and there are many signs that the Paki army is reading the signs exactly like this and reacting.
The ideal solution is a war with India. 26/11 was the most blatant attempt at doing that. A war with India will get the Americans pouring money into the Pakistan army. But India is not taking the bait and the US is beginning to see the light. The survival plank of the Pakistani army is collapsing without war. The Pakistani army does not want to lose. They want to survive intact and with power. Unlike the US, China and India, their power has always come from gifts, begging and blackmail - not from a powerful internal economy with a cash rich Pakistani industry filling the army's coffers. Begging and blackmail are easier, faster and "more traditional" than setting the Pakistan economy in order which is nearly impossible. Setting the Pakistan economy in order will need a downgradation of the Paki army to Sri Lankan army levels.
The only way out will be to ally with religion based interests. I would judge that some degree of nuclear expertise among the so called "Taliban" and the "jihadis" is a given. Sharing with Saudi Arabia and Iran is likely. Sunni might not like Shia, but both don't like Israel and the arming of Iran and KSA with nukes seems likely. But none of these things will help the individual leaders of the Pakistani army to survive intact with power and privileges. One possible option is to shift allegiance to the jihadi groups. See a large scale "retirement" of officers from the Pakistan army to serve as behind the scenes leaders and advisors for the Taliban(David Headley case). The official designation of some Taliban/jihadi groups as being in control of some nuclear weapons is also a possibility. Once that begins to happen, we can see a gradual winding up of the power of the Pakistan army which will become subservient to the jihadi groups. The US will resist this and try to "save" the "moderate" Pakistani army, but if that fails they will star negotiating with the Taliban and offering to pay them money for not attacking US interests.
If that happens it will really be an acknowledgement of a US that is becoming weak and handing over power to new power centers. The US begging the Taliban for favors is just the situation that the Pakistani army is looking for and the best way to do that is to keep the Taliban strong while squeezing the US to keep the Paki army strong. It is win win either way for the Paki army/Taliban combine. Another win-win situation would be to get India to make concessions on Kashmir. that will only strengthen the islamist hand and prove that their tactics are effective.
A powerful Paki army/Taliban combine with nuclear weapons is what is being sought by the forces of islamic extremism. That will be a shot in the arm for the Wahhabis of KSA, for iran as well as other assorted groups and things will get really dangerous for Israel. The threat of nuclear bombs being detonated wherever there is an Islamic interest will then become reality and nuclear terrorism will be on our doorstep.
I am currently not clear in my mind what can be done about this and what is being done about this. The US, China and India are key players here and to a lesser extent European players and Japan. And of course the "aam junta" - the people of Pakisan have a big role to play - in fact their role this may be the biggest role. Having argued above as to how the Pakistan/Army/Taliban combine have a great synergy that will keep them powerful with no guarantee that only the army will keep control of nuclear weapons we also need to look at factors that will spoil this Paki army-Taliban party.