Transfers and buyouts as part of a divorce do not adjust the cost basis, so no matter what you paid your ex or borrow to do it, your cost basis remains $425,000. You would have a gain of $325,000 and owe tax on $75,000 after the exclusion. (There may be other adjustments you can consider like the selling commission that will reduce your gain.)
However, if you both retain ownership, and your divorce agreement grants you the right to live there, then whenever you do sell, both you and your ex would qualify for the exclusion, even though your ex no longer lives there. You would each report a gain of $162,500, which would be non-taxable because you each can claim the $250,000 exclusion. Whether you want to be financially tied to your ex (in order to save about $12,000 of capital gains tax plus the interest on the loan) is something to discuss with your attorney.
See publication 523,
https://www.irs.gov/pub/irs-pdf/p523.pdf