The calculated distance (air line) between Ifrane and Safi is approximately 174 miles respectively 280 kilometers.
By car or train, the actual journey to Safi is certainly longer, as only the direct route (as the crow flies) between Ifrane and Safi has been calculated here.