Source

If you need further info on how Stable Diffusion works, I suggest you to read my notes on LoRA and also the following links:

Different Stable Diffusion techniques you should learn about: