Skip to content

Commit 709588f

Browse files
committed
updated readme
1 parent 61e53e5 commit 709588f

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed

README.md

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff 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 [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1zjr9n60q3G8Qd87WG3ZnjDgI-D1YBCbG?usp=sharing)
11+
- Image to image [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1zjr9n60q3G8Qd87WG3ZnjDgI-D1YBCbG?usp=sharing)
12+
- Sketch to image [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](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+
<img src="./img/lion_short.png">
319

420
To obtain better results, the prompt should be egineered. A basic recipe is the following:
521

@@ -9,14 +25,28 @@ To obtain better results, the prompt should be egineered. A basic recipe is the
925
- 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.
1026
- 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.
1127

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+
<img src="./img/lion_long1.png">
1333

1434
*"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"*
1535

36+
<img src="./img/lion_long.png">
37+
1638
To see more examples of prompts and get inspirations, check [here](https://lexica.art/).
1739

1840

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).
2050

2151
**Colab notebooks**
2252
- Introduction to diffusers 🧨, the Hugging Face 🤗 library for diffusion models [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](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
2858
- [What are Diffusion Models?](https://lilianweng.github.io/posts/2021-07-11-diffusion-models/#nice) introduction to Diffusion models and mathematical derivations.
2959
- [The Annotated Diffusion Model](https://huggingface.co/blog/annotated-diffusion) step-by-step tutorial for building a Diffusion model from scratch in Pytorch
3060
- [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.

img/lion_long.png

1.31 MB
Loading

img/lion_long1.png

1.99 MB
Loading

img/lion_short.png

465 KB
Loading

0 commit comments

Comments
 (0)