Deformed minimal models and generalized Toda theory