Ask them if everything is okay? Give them a chance to make amends. Sometimes inconsistency can be unintentional too!
Allow them to come up to you and make the first move rather than you going to them again & again.
Confront them directly. Tell them their inconsistent behaviour will not work with you anymore.
If nothing is working in your favour, it is best to let the inconsistent person go.