The biggest obstacle to doing this is getting approval from your ex. He has to have the credit score, income, and willingness to refinance the loan. Otherwise, there’s not much you can do about it. If he stops paying, you may have little recourse as the co-borrower.
Therefore, remain as friendly and cordial as possible (even if it’s tough) and discuss what you need to do with your finances. The more mature that you two can act during these conversations, the better the end result will be; hopefully, it will end without malice or spite.
Best of luck with everything!