https://github.com/outofai/stableface
Build your own Face App with Stable Diffusion 2.1
https://github.com/outofai/stableface
attention-is-all-you-need ddim-inversion diffusion-models faceapp generative-ai generativeai image-editing image-editing-app image-reconstruction photo-editing-app pivotal-inversion prompt2prompt sampling-distribution stable-diffusion stable-diffusion-2-1 stableface transformers
Last synced: 2 months ago
JSON representation
Build your own Face App with Stable Diffusion 2.1
- Host: GitHub
- URL: https://github.com/outofai/stableface
- Owner: OutofAi
- License: mit
- Created: 2024-06-29T09:28:53.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-01-10T00:05:21.000Z (5 months ago)
- Last Synced: 2025-03-29T08:05:19.359Z (2 months ago)
- Topics: attention-is-all-you-need, ddim-inversion, diffusion-models, faceapp, generative-ai, generativeai, image-editing, image-editing-app, image-reconstruction, photo-editing-app, pivotal-inversion, prompt2prompt, sampling-distribution, stable-diffusion, stable-diffusion-2-1, stableface, transformers
- Language: Jupyter Notebook
- Homepage:
- Size: 1.78 MB
- Stars: 150
- Watchers: 2
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# StableFace
![]()
[](https://twitter.com/OutofAi)
[](https://colab.research.google.com/github/OutofAi/StableFace/blob/main/CH7_stable_face.ipynb)## Build your own Face App with Stable Diffusion 2.1 Base
https://github.com/OutofAi/StableFace/assets/145302363/6e9e414a-f3da-47ca-9ad6-61b4bbf9e198A set of simple notebooks to create a clear understanding on Stable Diffusion aspects like sampling, architecture, CFG, attention layers, inverse scheduler, pivotal inversion, image reconsutrction and prompt2prompt editting which we utilise to achieve hyperreaslitic results to edit any real-world face and build a pipeline to build your own face app.
(You can skip to Chapter 7 if you are already familiar with the basics of SD)
|||
|:--------|:---------------:|
| *Chapter 1: Sampling but not Inference*
A Simple example of how to create/sample an image with diffusers pipeline
| [](https://colab.research.google.com/github/OutofAi/StableFace/blob/main/CH1_sampling.ipynb) |
| *Chapter 2: Stable Diffusion Dissected*
Exploring the individual elements that results in image generation
| [](https://colab.research.google.com/github/OutofAi/StableFace/blob/main/CH2_breakdown.ipynb) |
| *Chapter 3: Spicing it up with CFG*
Exploring Classifier-Free Guidance to enhance image generation.
| [](https://colab.research.google.com/github/OutofAi/StableFace/blob/main/CH3_CFG.ipynb) |
| *Chapter 4: Attention, Please!*
Overriding attention layer tomanipulate image generation process
| [](https://colab.research.google.com/github/OutofAi/StableFace/blob/main/CH4_attention_breakdown.ipynb) |
| *Chapter 5: Attention Switcheroo*
Shared cross-attention layers between multiple images.
| [](https://colab.research.google.com/github/OutofAi/StableFace/blob/main/CH5_attention_replace.ipynb) |
| *Chapter 6: Reality Check*
DDIM-inversion and pivotal tuning for accurate image reconstruction.
| [](https://colab.research.google.com/github/OutofAi/StableFace/blob/main/CH6_reconstruction.ipynb) |
| *Chapter 7: FaceApp, Who?*
Synthesise learnings to create an advanced facial feature editing system.
| [](https://colab.research.google.com/github/OutofAi/StableFace/blob/main/CH7_stable_face.ipynb) ||||
|:--------|:---------------:|
| *Appendix 1: FaceApp, XL!!*
SD XL based face editing with corrective actions.
| [](https://colab.research.google.com/github/OutofAi/StableFace/blob/main/APDX1_stable_face_XL.ipynb) |