We present an algorithm for coherent diffractive imaging with phaseless measurements. It treats the forward model as a combination of coherent and incoherent waves. The algorithm reconstructs absorption and phase contrast that quantifies the attenuation and the refraction of the waves propagating through an object. It requires coherent or partially coherent illuminations, and several detectors to record the intensity of the distorted wave that passes through the object under inspection. The diversity of illuminations, obtained by putting masks between the source and the object, provides enough information for imaging. The computational cost of our algorithm is linear in the number of pixels of the image. Therefore, it is efficient for high-resolution imaging. Our algorithm guarantees exact recovery if the image is sparse for a given basis. Numerical experiments in the setting of phaseless diffraction imaging of sparse objects validate the efficiency and the precision of the suggested algorithm.