Do what? The Ausgleich bound them to Austria and how does becoming a weak, friendless nation surrounded by enemies stop them losing Dalmatia?
It doesn't, really, which is part of why my initial thoughts were a negotiated settlement between Austria and Italy and I'm still sort of considering both scenarios at once.
So-
assuming Italy achieves a breakthrough, occupying the Austrian riviera up to Ljubjana:
1) what sort of terms will it demand from the Entente for helping continue the war (declaring war on Germany, joining the pledge against a separate peace, putting twenty or so division in France or Syria, etc)
2) what sort of terms would the Entente offer Italy to induce the above?
3) what sort of terms would Austria (and Germany by extension) offer to get Italy to drop out of the war?
for one, Italy has potential claims on the Levant due to the dynastic concerns, envy of France, and wanting a source of oil for the navy. The Italians were hesitant to partition Austria entirely, due to fearing a pan-Serbian Yugoslavia- any extension of claims in the Balkans would have to be in the context of limiting Russian and French interests there, so for instance demanding all of Dalmatia and a protectorate over rump Croatian, Hungarian, and/or Austrian states (basically imagine borders along the lines of the WWII partition, but with an Austro-Bohemian union in place of Greater Germany). Montenegro is tied to Italy by the royal dynasty and again Italy has a demonstrated interest (see- Albanian crisis, and the Italo-Austrian intervention to keep Serbia away from the Adriatic) in keeping Serbia off the Adriatic coast.
Both of these claims and interests directly conflict with the Triple Entente, specifically France and Russia- Britain might come around to a deal with Italy precisely to limit Russian influence in the Balkans. Maybe the French are induced to drop their claims to Syria, and a "greater Syrian" state emerges under loose Italian and British influence? Mosul was given to France by Sevres, and could potentially remain with such a state, or made into a Kurdish state.
2) again ties to the above- the Entente would presumably wave off Croatia and Austria proper, certainly Albania and Montenegro, possibly somaliland- but that IMHO just doesn't justify continued Italian involvement in the war, given their aforementioned fears of Franco-Russian ambitions in the region. The DEI strike me as a possible way to cut the Gordian knot, assuming France digs in her heels over Syria. IIRC Curacao had oil discovered at this time- that and the prospect of a "global" empire would presumably sate Italian imperialism.
3) Austria would have to offer at minimum everything promised under the London Treaty to get Italy to consider accepting an armistice. This would only work under certain circumstances- Romania collapsing, the Entente offensives petering out. Italy won't leave unless the Entente war effort drags on long enough to seem like a bad bet,
or they get everything they want from Austria and the regime decides it fears Russo-French imperialism more than British displeasure. An Austrian collapse could trigger a temporary armistice; if Russia is streaming across the Carpathians and demanding a "Greater Serbia" that would probably scare Soninno et al into coming to terms with the Germans in order to consolidate their gains, and I suspect the Germans would be happy to eliminate the Italian front with the Russians bearing down on them with full force.