According to the Special Features, Mahershala took piano lessons from Kris Bowers and could play quite well. So, perhaps, those parts are Mahershala playing. Or, maybe they put Mahershala's face on Kris. In any case, all the other playing was done by Kris.