I have had the worst diatom outbreak after I removed several rocks from my tank. To me diatom is often related to:
major rearranging rock work, disturbing sand bed, having a new tank.
I always use RODI water but I guess you could also import stuff in water.
I fought my diatom outbreak with everything I could find: phosphate adsorbing media or different kinds, daily water changes, etc.
In the end it just ran it's course and was gone again -replaced by much anticipated green algae. lol