An image forming apparatus which is capable of forming an excellent image
while suppressing reduction in productivity to a minimum even when an
abnormality occurs in detection of an HP mark on an intermediate transfer
member. When there occurs abnormality in detection of any of HP marks, an
alternate signal is generated in place of a signal associated with a mark
the detection of which is determined to be abnormal, and image formation
is carried out with reference to the time of normal HP mark detection and
the alternate signal.