Geophysical inverse problems with measurement-guided diffusion models