We propose a class dependent factor analysis model (CDFA) which can be used in the general face recognition task under certain variations. The model utilizes the class information in a supervised manner to define a separate manifold for each class. Inside each manifold, a mixture of Gaussians is designated to handle the variation. The proposed model learns the system parameters in a probabilistic framework, allowing a Bayesian decision model. A manifold embedding technique is incorporated to handle the nonlinearity introduced by the variation; hence, a novel connection between manifold learning and probabilistic generative models is proposed. CDFA has better recognition accuracy and scalability over a classical factor analysis model. Experimental evaluations on the face recognition under changing illumination conditions and facial expressions indicate the ability of the proposed model to handle different types of variation. The achieved recognition rates are comparable to the state-of-art results, while it is also shown that the recognition rate does not decrease critically as the number of gallery identities increases. (C) 2012 Elsevier Ltd. All rights reserved.