Suppose I have a smooth projective surface $S\subset P^n$ embedded by a very ample linear system $|L|$. Consider now the generalized Severi varieties that parametrize curves oon $S$ with a given number of singularities of prescribed type. E.g.: one nodes, two nodes, one cusp, one node and one cusp, one tacnod, one triple point and one node... etc.

 My question is: is the dimension of such varieties invariant when the surface undergoes blow-up and blow-down transformations? 

I imagine that possibly one needs some hypothesis of irreducibilty on the curves.