The current study primarily aimed to simulate detonation initiation via turbulent jet flame acceleration in partial-premixed H2-air mixtures. Different vertical concentration gradients were generated by varying the duration of hydrogen injection (diffusion time) within an enclosed channel filled with air. H2-air mixtures with average hydrogen concentrations of 22.5% (lean mixture) and 30% (near stoichiometric mixture) were investigated at diffusion times of 3, 5, and 60 s. Numerical results show that the vertical concentration gradient significantly influences the early stage of flame acceleration (FA). In the stratified lean mixture, detonation began at all the diffusion times, and comparing the flame-speed graphs showed that a decrease in the diffusion time and an increase in the mixture inhomogeneity speeded up the flame propagation and the jet flame-to-detonation transition occurrence in the channel. In the stratified H2-air mixture with an average hydrogen concentration of 30%, the transition from a turbulent jet flame to detonation occurred in all the cases, and the mixture inhomogeneity weakened the FA and delayed the detonation initiation.