Since the diode is a non-linear element, the network is non-linear and hence only source transformation is applicable (superposition theorem is not applicable).
For an ideal diode V_{ f }=0 \text { and } R_{ f }=0 . So,
5 – 2 i_d – 1 i_d – 2 = 0 ⇒ i_d = 1 A