I was always in the camp of Ace's problems being mental, and while I think some of it was just returning to what he did last year, I do think Cueto coming in helped that happen. He's been hearing all season (and even some of last postseason) about how he's the bad guy and his cockiness and swagger make him the villain, etc. Then Cueto comes in and he sees someone who has carried that cockiness and swagger for quite some time now and used it to become one of the top trade targets at the deadline. Then to make it even better it happens to be a guy from his home country who was already chummy with Volquez and it all lines up to help restore his confidence.
Obviously it's impossible to tell either way if he'd be pitching this well without Cueto, so I'm just going to sit back and enjoy the fun that is a confident Ace.