torchmfbd carries out multi-object multi-frame blind deconvolution (MOMFBD) of point-like or extended objects, and is especially tailored to solar images. The code is built on PyTorch and provides a high-level interface for adding observations, defining phase diversity channels, and adding regularization. It can deal with spatially variant PSFs either by mosaicking the images or by defining a spatially variant PSF. torchmfbd supports smooth solutions and solutions based on the ℓ 1 penalization of the isotropic undecimated wavelet transform of the object, and regularizations are easily extendable. The code also includes an API and a configuration file.