An image forming apparatus including a plurality of container units
containing sheets, a sheet feeding device provided for each of the
plurality of container units and configured to feed the sheets; and a
controller switching between modes including a first mode and a second
mode in order to automatically switch a sheet feeding position from a
container unit in current use to another container unit. In the first
mode, the sheet feeding position is switched to the other container unit
in the state in which a prescribed amount of sheets are left in the
container unit in current use, and in the second mode, the sheet feeding
position is switched to the other container unit after the sheets in the
container unit in current use are exhausted.