On the assumption that the spouse and children are in the U.S. with conditional permanent residency status, a subsequent divorce between the spouses will not effect the divorced spouses from each obtaining the removal of the conditions of permanent residency.
Assuming you are within the conditional permanent resident status currently, your spouse was already listed as a derivative beneficiary. At the I-829 stage to remove conditions, your spouse could still be included, even after your divorce. You and the spouse will still need to otherwise comply with the requirements to remove conditions.