Embodiments for operating an engine with skip fire are provided. In one example, a method comprises during a skip fire mode or during a skip fire mode transition, port injecting a first fuel quantity to a cylinder of an engine, the first fuel quantity based on a first, predicted air charge amount for the cylinder and lean of a desired air-fuel ratio, and direct injecting a second fuel quantity to the cylinder, the second fuel quantity based on the first fuel quantity and a second, calculated air charge amount for the cylinder.