Patreon
Home / Videos / How To Do Stable Diffusion Textual Inversion (TI) / Text Emb

How To Do Stable Diffusion Textual Inversion (TI) / Text Embeddings By Automatic1111 Web UI Tutorial

Our Discord : https://discord.gg/HbqgGaZVmr. Grand Master tutorial for Textual Inversion / Text Embeddings. If I have been of assistance to you and you would like to show your support for my work, please consider becoming a patron on 🥰 https://www.patreon.com/SECourses

Published Jan 19, 2023 · 57,581 views · Watch on YouTube

Chapters

  1. 0:00 Introduction to #StableDiffusion #TextualInversion Embeddings
  2. 1:00 Which commit of the #Automatic1111 Web UI we are using and how to checkout / switch to specific commit of any Git project
  3. 4:07 Used command line arguments of Automatic1111 webui-user.bat file
  4. 4:35 Automatic1111 command line arguments
  5. 5:31 How to and where to put Stable Diffusion models and VAE files in Automatic1111 installation
  6. 6:05 Why do we use latest VAE file and what does VAE file do
  7. 8:24 Training settings of Automatic1111
  8. 10:38 All about names of text embeddings
  9. 11:00 What is initialization text of textual inversion training
  10. 11:32 Embedding inspector extension of Automatic1111
  11. 14:25 How to set number of vectors per token when doing Textual Inversion training
  12. 16:00 How the prompts getting tokenized - turned into tokens - by using tokenizer extension
  13. 18:58 Setting number of training vectors
  14. 20:24 Where embedding files are saved in automatic1111 installation
  15. 20:38 All about preprocess images before TI training
  16. 23:06 Training tab of textual inversion
  17. 23:18 What to and how to set embedding learning rate
  18. 23:40 What are the Batch size and Gradient accumulation steps and how to set them
  19. 24:40 How to set training learning rate according to Batch size and Gradient accumulation steps
  20. 26:21 What are prompt templates, what are they used for, how to set and use them in textual inversion training
  21. 29:06 What are filewords and how they are used in training in automatic1111 web ui
  22. 29:35 How to edit image captions when doing textual inversion training
  23. 31:07 From training images pool, how and why did i choose some of them and not all of them
  24. 31:54 Why I did add noise to the backgrounds of some training dataset images
  25. 32:07 How should be your training dataset. What is a good training dataset
  26. 34:48 Save TI training checkpoints
  27. 36:31 Which latent sampling method is best
  28. 39:59 Training started
  29. 41:34 How to use inspect_embedding_training script to determine overtraining of textual inversion
  30. 42:31 What is training loss
  31. 48:23 Technical difference of Textual Inversion, DreamBooth, LoRA and HyperNetworks training
  32. 52:17 Over 200 epochs and already got very good sample preview images
  33. 54:28 How to set newest VAE file as default in the settings of automatic1111 web ui
  34. 55:06 How to use generated embeddings checkpoint files
  35. 58:31 How to test different checkpoints via X/Y plot and embedding files name generator script
  36. 67:27 How to upscale image by using AI
  37. 68:42 How to use multiple embeddings in a prompt

About this video

Our Discord : https://discord.gg/HbqgGaZVmr. Grand Master tutorial for Textual Inversion / Text Embeddings. If I have been of assistance to you and you would like to show your support for my work, please consider becoming a patron on 🥰 https://www.patreon.com/SECourses

Playlist of Stable Diffusion Tutorials, Automatic1111 and Google Colab Guides, DreamBooth, Textual Inversion / Embedding, LoRA, AI Upscaling, Pix2Pix, Img2Img:

https://www.youtube.com/playlist?list=PL_pbwdIyffsmclLl0O144nQRnezKlNdx3

In this video, I am explaining almost every aspect of Stable Diffusion Textual Inversion (TI) / Text Embeddings. I am demonstrating a live example of how to train a person face with all of the best settings including technical details.

TI Academic Paper: https://arxiv.org/pdf/2208.01618.pdf

Automatic1111 Repo: https://github.com/AUTOMATIC1111/stable-diffusion-webui

Easiest Way to Install & Run Stable Diffusion Web UI on PC

https://youtu.be/AZg6vzWHOTA

How to use Stable Diffusion V2.1 and Different Models in the Web UI

https://youtu.be/aAyvsX-EpG4

Automatic1111 Used Commit : d8f8bcb821fa62e943eb95ee05b8a949317326fe

Git Bash : https://git-scm.com/downloads

Automatic1111 Command Line Arguments List: https://bit.ly/StartArguments

S.D. 1.5 CKPT: https://huggingface.co/runwayml/stable-diffusion-v1-5/tree/main

Latest Best S.D. VAE File: https://huggingface.co/stabilityai/sd-vae-ft-mse-original/tree/main

VAE File Explanation: https://bit.ly/WhatIsVAE

Cross attention optimizations bug: https://bit.ly/CrosOptBug

Vector Pull Request: https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/6667

All of the tokens list in Stable Diffusion: https://huggingface.co/openai/clip-vit-large-patch14/tree/main

Example training dataset used in the video:

https://drive.google.com/file/d/1Hom2XbILub0hQc-zmLizRcwFrKwHYGcc/view?usp=sharing

Inspect-Embedding-Training Script repo:

https://github.com/Zyin055/Inspect-Embedding-Training

How to Inject Your Trained Subject: https://youtu.be/s25hcW4zq4M

Comparison of training techniques: https://bit.ly/TechnicComparison

Embedding file name list generator script:

https://jsfiddle.net/MonsterMMORPG/Lg0swc1b/10/

0:00 Introduction to #StableDiffusion #TextualInversion Embeddings

1:00 Which commit of the #Automatic1111 Web UI we are using and how to checkout / switch to specific commit of any Git project

4:07 Used command line arguments of Automatic1111 webui-user.bat file

4:35 Automatic1111 command line arguments

5:31 How to and where to put Stable Diffusion models and VAE files in Automatic1111 installation

6:05 Why do we use latest VAE file and what does VAE file do

8:24 Training settings of Automatic1111

10:38 All about names of text embeddings

11:00 What is initialization text of textual inversion training

11:32 Embedding inspector extension of Automatic1111

14:25 How to set number of vectors per token when doing Textual Inversion training

11:52 Technical and detailed explanation of tokens and their numerical weights vectors in Stable Diffusion

16:00 How the prompts getting tokenized - turned into tokens - by using tokenizer extension