Vacuum leak is a good probable cause. Check it again. Go over all the clamps, just in case. Please fill in your profile, we can see the upgrades on your Z.
Did you pull codes from the ECU? See what it indicates.
Then check your IACV-AAC (Idle air control valve)harness connector. It can have some corrosion and not making good contact, also the unit itself can be dirty / clogged.
If that does not work. Check your injectors. Ignition spark, coils. Then check your fuel pressure. O2 sensors would be next on your list to check. If all fails, try another ECU. Not probable but possible.