Since the deep learning based SAR despeckling models rely heavily on the labeled training data, and struggle to process noisy images with varying noise distribution, this paper proposes an unsupervised SAR despeckling model based on the diffusion model which consists of a forward and a reverse processes. In the forward process, the noise with Gaussian distribution is gradually added to the clear image in the logarithmic domain until the image is heavily contaminated. Then in the reverse process, the noise of the image is gradually predicted and removed by the U-net like neural network until the image is close to the clear image. Furthermore, this paper proposes a shifting and averaging based algorithm for processing high resolution image in patches separately, which gets rid of the dependence on high video memory GPUs. Experiments results demonstrate that the proposed unsupervised despeckling model can be adopted to despeckle SAR images with varying noise intensities simply by adjusting the external parameter values. Though the model’s training does not depend on any clear SAR images, it has close performance compared with advanced supervised models.