You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-4Lines changed: 37 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,21 @@
1
-
## Prompt engineering guide
2
-
Let's say you want to draw an image of ``lion``. The raw promt, ``lion`` will give you images that are usually chaotic or of bad quality.
1
+
## 1. Quick start
2
+
3
+
Recently, the [Stable Diffusion Public Release](https://stability.ai/blog/stable-diffusion-public-release) made available to everyone one of the most powerful deep learning model for image generation.
4
+
5
+
This repository is a collection of simple scripts that can be used to generate images with Stable Diffusion and gives an introduction to the theory behind diffusion models.
6
+
7
+
To start using Stable Diffusion, you first need to create an account on [Huggin's Face](https://huggingface.co/) and generate a [token](https://huggingface.co/docs/hub/security-tokens). Afterwards, if you have access to a GPU server, you can follow the basic tutorial in the [model card](https://huggingface.co/CompVis/stable-diffusion-v1-4).
8
+
If you don't have a GPU server to run the model, you can try out Stable Diffusion using one of the Colab notebooks below.
9
+
10
+
- Text to image [](https://colab.research.google.com/drive/1zjr9n60q3G8Qd87WG3ZnjDgI-D1YBCbG?usp=sharing)
11
+
- Image to image [](https://colab.research.google.com/drive/1zjr9n60q3G8Qd87WG3ZnjDgI-D1YBCbG?usp=sharing)
12
+
- Sketch to image [](https://colab.research.google.com/drive/1MyESLsR8D5l_EBqumwxL0eMzNmd3uqs6?usp=sharing)
13
+
14
+
15
+
## 2. Prompt engineering guide
16
+
Let's say you want to draw an image of ``lion``. The raw promt, ``lion`` will give you images that are usually a bit chaotic or worse quality.
17
+
18
+
<imgsrc="./img/lion_short.png">
3
19
4
20
To obtain better results, the prompt should be egineered. A basic recipe is the following:
5
21
@@ -9,14 +25,28 @@ To obtain better results, the prompt should be egineered. A basic recipe is the
9
25
- Examples of ``artist`` are: Jan van Eyck (when ``style`` = *Portrait*), *Vincent Van Gogh* (when ``style`` = *Oil painting*), *Leonardo Da Vinci* (when ``style`` = *Pencil drawing*), and so on. Note that you can also mix artists, to get original results.
10
26
- Examples of ``details`` are *Unreal Engine* if you want to add realistic lightining, *8 k* if you want to add more details, *artstation* if you want to make your image more artistic, and so on.
11
27
12
-
Example of elaborated prompt:
28
+
Example of elaborated prompts:
29
+
30
+
*"Professional photograph of a lion with a black mane, high quality, highly detailed, award-winning, hd, 8k, awe-inspirin"*
31
+
32
+
<imgsrc="./img/lion_long1.png">
13
33
14
34
*"retrofuturistic portrait of a lion in astro suit, space graphics art in background, close up, wlop, dan mumford, artgerm, liam brazier, peter mohrbacher, raw, featured in artstation, octane render, cinematic, elegant, intricate, 8 k"*
15
35
36
+
<imgsrc="./img/lion_long.png">
37
+
16
38
To see more examples of prompts and get inspirations, check [here](https://lexica.art/).
17
39
18
40
19
-
## Resources
41
+
## 3. Diffusion model theory and step-by-step implementation
42
+
43
+
Pytorch implementation of the diffussion model presented in [].
44
+
45
+
46
+
## 4. Resources
47
+
48
+
**Repositories**
49
+
- A browser interface based on Gradio library for Stable Diffusion [link](https://github.com/AUTOMATIC1111/stable-diffusion-webui).
20
50
21
51
**Colab notebooks**
22
52
- Introduction to diffusers 🧨, the Hugging Face 🤗 library for diffusion models [](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/diffusers_intro.ipynb)
@@ -28,3 +58,6 @@ To see more examples of prompts and get inspirations, check [here](https://lexic
28
58
-[What are Diffusion Models?](https://lilianweng.github.io/posts/2021-07-11-diffusion-models/#nice) introduction to Diffusion models and mathematical derivations.
29
59
-[The Annotated Diffusion Model](https://huggingface.co/blog/annotated-diffusion) step-by-step tutorial for building a Diffusion model from scratch in Pytorch
30
60
-[Generative Modeling by Estimating Gradients of the Data Distribution](https://yang-song.net/blog/2021/score/) Introduction to score-based generative models.
61
+
62
+
**Papers**
63
+
-[[1](https://openaccess.thecvf.com/content/CVPR2022/papers/Rombach_High-Resolution_Image_Synthesis_With_Latent_Diffusion_Models_CVPR_2022_paper.pdf)] Rombach, Robin, et al. "High-resolution image synthesis with latent diffusion models." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2022.
0 commit comments