Let p > 2 be prime. We use purely local methods to determine the possible reductions of certain two-dimensional crystalline representations, which we call pseudo-Barsotti-Tate representations, over arbitrary finite extensions of ℚp. As a consequence, we establish (under the usual Taylor–Wiles hypothesis) the weight part of Serre's conjecture for GL.2/ over arbitrary totally real fields.