First calculations for deformed nuclei with the Fayans functional are carried out for the uranium and lead isotopic chains. The ground state deformations and deformation energies are compared to Skyrme-Hartree-Fock-Bogolyubov results of HFB-17 and HFB-27 functionals. For the uranium isotopic chain, the Fayans functional predictions are rather similar properties compared to HFB-17 and HFB-27. However, there is a disagreement for the lead isotopic chain. Both of the Skyrme HFB functionals predict rather strong deformations for the light Pb isotopes which does not agree with the experimental data on charge radii and magnetic moments of the odd Pb isotopes. On the other hand, the Fayans functional predicts a spherical ground state for all of the lead isotopes, in accordance with the data and the known in literature results obtained with the Gogny D1S force and SLy6 functional as well. The deformation energy curves are calculated and compared to four Skyrme functionals, SLy4, Sly6, SkM* and UNEDF1, for $^{238}$U nucleus and several lead deficient Pb isotopes. In the first case, the Fayans functional result is rather close to SkM* and UNEDF1 which, in particularly the latter one, describe the first and second barriers in $^{238}$U rather well. For the light lead isotopes, the Fayans deformation energy curves are qualitatively close to those of the SLy6 functional.