Small thought that helped me visualise what’s going on (I understand this is only a slightly rephrase of what was said in the lecture, it just helped me phrasing it this way). An incredibly high view of what goes on with SD is the following:
A model M is a function of the input, its parameters and a loss function. While training, we minimize the loss by changing the parameters according to fixed inputs. With SD inference we minimize a different loss by changing the input and keeping the parameters.
In a way, during inference the input becomes the parameters of our model.
Possibly trivial observation, but maybe somebody finds it useful too.