Project

General

Profile

StableDiffusion » History » Version 3

Anonymous, 02/26/2023 10:06 AM
mostly corrected wiki syntax

1 1
h1. Stable Diffusion Setup
2
3
Stable Diffusion <add info here>
4
5
h2. Prerequisites
6
7
h3. Hardware
8
9
* Modern Linux computer with 20 GB disk space 
10
* NVidia GPU with >= 4 GB VRAM
11
12
h3. CUDA
13
14
Installation of NVidia Driver and CUDA is not covered here.
15
16
h3. Docker
17
18
# Ensure Docker prereqs are all installed:
19
<pre>
20
$ sudo apt update
21
$ sudo apt install ca-certificates curl gnupg lsb-release
22
</pre>
23
# Install GPG key:
24
<pre>
25
$ sudo mkdir -m 0755 -p /etc/apt/keyrings
26
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
27
</pre>
28
# Add Docker APT repository configuration:
29
<pre>
30
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
31
</pre>
32
# Install packages:
33
<pre>
34
$ sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
35
</pre>
36
37
h3. NVidia Container Toolkit
38
39
# Install GPG key:
40
<pre>
41
$ curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | apt-key add -
42
</pre>
43
# Setup APT repo:
44
<pre>
45
$ sudo bash -c "curl -s -L https://nvidia.github.io/nvidia-docker/ubuntu22.04/nvidia-docker.list > /etc/apt/sources.list.d/nvidia-docker.list"
46
</pre>
47
# Install package:
48
<pre>
49
$ sudo apt update
50
$ sudo apt -y install nvidia-container-toolkit
51
</pre>
52
# Restart docker:
53
<pre>
54
$ sudo systemctl restart docker
55
</pre>
56 2
57
h2. Stable Diffusion Docker Container of WebUI
58
59
# Go to https://github.com/AbdBarho/stable-diffusion-webui-docker/releases, download the latest source code release (ZIP) under Assets.  Unzip it somewhere.
60
# Go to the directory where you unzipped the archive, and run
61
<pre>
62
sudo docker compose --profile download up --build
63
</pre>
64
this will download 12GB of pretrained models. Wait until it is finished, then
65
<pre>
66
docker compose --profile auto up --build
67
</pre>
68
More details are available on the project's wiki: https://github.com/AbdBarho/stable-diffusion-webui-docker/wiki/Setup
69
# Wait until you see
70
<pre>
71
 Running on local URL:  http://0.0.0.0:7860
72
 To create a public link, set `share=True` in `launch()`.
73
</pre>
74
Then go to http://localhost:7860/ in any browser.
75
76
h2. Naughty Stuff
77
78
# Download one of the better 'Nudifying' models,
79 3
** Go to https://civitai.com/models/2661/uber-realistic-porn-merge-urpm (account required) and under Versions, click on 'URPMv1.2-inpainting', then at the right, download
80
*** "Pruned Model SafeTensor (1.99 GB)"
81 2
** "Config"
82 3
** Save them to the @data/StableDiffusion@ folder in the Webui docker project you unzipped earlier. The model file should be called @uberRealisticPornMerge_urpmv12-inpainting.safetensors@ and the config file should be named @uberRealisticPornMerge_urpmv12-inpainting.yaml@
83
# Embeddings​
84
** Add the following files in the @data/embeddings@: https://gofile.io/d/az0mmz
85
** These allow you to add @breasts@, @small_tits@ and @Style-Unshaved@ in your prompt, and provide better quality breasts / vaginas. The first one is more generalized, the latter is well.. yes.
86
** Check the Discord link in the 'Additional Tips', ppl post additional embeddings on there.
87
# Loading Model​
88
** In the webui, at the top left, "Stable Diffusion checkpoint", hit the 'Refresh' icon.
89
** Now you should see the @uberRealisticPornMerge_urpmv12@ model in the list, select it.
90
# Model Parameters​
91
** Go to the 'img2img' tab, and then the 'Inpaint' tab.
92
** In the first textarea (positive prompt), enter
93
*** <pre>RAW photo of a nude woman, naked​</pre>
94
** In the second textarea (negative prompt), enter
95
*** <pre>((clothing), (monochrome:1.3), (deformed, distorted, disfigured:1.3), (hair), jeans, tattoo, wet, water, clothing, shadow, 3d render, cartoon, ((blurry)), duplicate, ((duplicate body parts)), (disfigured), (poorly drawn), ((missing limbs)), logo, signature, text, words, low res, boring, artifacts, bad art, gross, ugly, poor quality, low quality, poorly drawn, bad anatomy, wrong anatomy​</pre>
96
** If not otherwise mentioned, leave default,
97
*** Masked content: fill (will just fill in the area without taking in to consideration the original masked 'content', but play around with others too)​
98
*​** Inpaint area: Only masked​
99
*** Sampling method: DPM++ SDE Karras (one of the better methods that takes care of using similar skin colors for masked area, etc)​
100
​*** Sampling steps: start with 20, then increase to 50 for better quality/results when needed. But the higher, the longer it takes. I have mostly good results with 20, but it all depends on the complexity of the source image and the masked area.​
101
​*** CFG Scale: 7 - 12 (mostly 7)​
102
​*** Denoise Strength: 0.75 (default, the lower you set this, the more it will look like the original masked area)​
103 2