developing container, if the sensor is stained by toner scattering or the like, there is a case in which the toner density cannot be accurately grasped and detected. [0011] Also, in the system that indirectly controls the toner density from the patch image density, with the downsizing of the image forming apparatus, disenables a space where a patch image is formed