An image forming apparatus includes a controller for controlling, when a
developer is accommodated in a developing container, a discharging device
such that an amount of developer in a first accommodating portion is not
less than a first amount, in accordance with a detection result of a
first detecting device and such that an amount of developer in a second
accommodating portion is not less than a second amount, in accordance
with a detection result of a second detecting device, and for permitting,
when the developing container is substantially empty, and the amount in
the first accommodating portion is less than the first amount, an image
forming operation to continue until the amount in the second developer
portion becomes less than the second amount.