Generalized Lax pairs for the computation of semi-invariants