If the crystal diffracts to high resolution (<1.2 Å), the initial phases can be estimated using direct methods.  Direct methods can be used in  x-ray crystallography, neutron crystallography, and electron crystallography.
A number of initial phases are tested and selected by this method. The other is the Patterson method, which directly determines the positions of heavy atoms.  The Patterson function gives a large value in a position which corresponds to interatomic vectors. This method can be applied only when the crystal contains heavy atoms or when a significant fraction of the structure is already known.  
For molecules whose crystals provide reflections in the sub-Ångström range, it is possible to determine phases by brute force methods, testing a series of phase values until spherical structures are observed in the resultant electron density map.  This works because atoms have a characteristic structure when viewed in the sub-Ångström range.  The technique is limited by processing power and data quality.  For practical purposes, it is limited to "small molecules" and peptides because they consistently provide high-quality diffraction with very few reflections.