Different Ways of Image Generation with Stable Diffusion 3

Stable Diffusion was considered one of the best open-source text-to-image models, and it was exciting to see that the newest "Stable Diffusion 3 Medium" model was released in June 2024 and is now available on HuggingFace. This model is freely available under a Non-Commercial Research Community License, so let's write some Python code and see how it works!
General Info
Stable Diffusion (SD) is a text-to-image model; the method itself is relatively new. The first paper about image synthesis with a latent diffusion model ("High-Resolution Image Synthesis with Latent Diffusion Models" by Rombach et al.) was published in 2022. A company named Stability AI became interested in this project, and the model was released in August 2022 under the name "Stable Diffusion." After that, it was improved several times. At the time of writing this article, Stable Diffusion 1.1 is still available on HuggingFace, and the newest version 3 was released in June 2024.
Now, let's run the model in Python.
Basic Test
Running a Stable Diffusion is extremely easy with a HuggingFace