“Transcendental-Programmer”
commited on
Commit
·
24f4867
1
Parent(s):
2bf5660
docs: update README
Browse files
README.md
CHANGED
@@ -1,2 +1,37 @@
|
|
1 |
# faceforge
|
2 |
Interactive latent space editor for face generation using pretrained GANs and diffusion models.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# faceforge
|
2 |
Interactive latent space editor for face generation using pretrained GANs and diffusion models.
|
3 |
+
|
4 |
+
# Latent Space Exploration
|
5 |
+
|
6 |
+
You can find cool things moving between encoded prompts in a conditional diffusion models latent space. This repository is for doing that.
|
7 |
+
|
8 |
+
# Usage
|
9 |
+
|
10 |
+
`pip install -r requirements.txt && python -m main`
|
11 |
+
|
12 |
+
Run the above command to explore. Feel free to mess around with the config to change how sampling is done, font sizes, etc.
|
13 |
+
Controls:
|
14 |
+
Q/E: zoom out/in
|
15 |
+
WASD: move up/left/down/right
|
16 |
+
Click anywhere to generate a new image
|
17 |
+
Click an existing point/node to select it
|
18 |
+
T: modify prompt in selected node
|
19 |
+
O: delete selected node
|
20 |
+
P: create a new node
|
21 |
+
Right click an existing point/node to move it around
|
22 |
+
M: Switch between sampling modes
|
23 |
+
|
24 |
+
# Notes
|
25 |
+
|
26 |
+
The zero vector for the encoding space corresponds to a kind of "garden". This corresponds to the negative prompt used in CFG. You can see this at the center of circle mode or when going very far from some points in distance mode.
|
27 |
+
|
28 |
+
In circle mode, having multiple prompts on the opposite side from your generation results in heavy negative coefficients which often knocks generation into garbage area of latent space.
|
29 |
+
To stay inside space of plausible generations, try to balance all sides of the circle.
|
30 |
+
|
31 |
+
In distance mode, your generation will go towards the zero vector if it is not close to any points, because it falls of to 0 with inverse of square distance to each point.
|
32 |
+
|
33 |
+
# Sampling Modes
|
34 |
+
|
35 |
+
Distance sampling assigns weights to each encoding based on its square distance from your control point
|
36 |
+
|
37 |
+
Circle sampling assigns weights to each encoding based on cosine similarity with your control point. Norm is factored in so this is basically just a dot product.
|