Child custody cases are based upon a totality of circumstances, and so nobody can consider one fact (i.e., leaving an abusive relationship) and give an evaluation of the case that is worth anything.
With that said, however, while the other party may try to paint a picture that your home life is unstable because you are currently leaving your husband you can sure bet that there is also a very strong argument that it is contrary to the best interests of the children to give custody to a parent who is living with someone who abuses not only that parent but the children as well.
You should consult with an attorney so that your case can be evaluated based on all of the facts. If your children are important enough to you to seek custody, they should be important enough to handle your case right.
Sign up to receive a 5-part series of useful information and advice about child custody law.