StableDiffusion

Stable Diffusion ๋“œ๋ฆผ๋ถ€์Šค ํ•™์Šต ํŠœํ† ๋ฆฌ์–ผ

joonojoono 2023. 3. 23. 23:39
๋ฐ˜์‘ํ˜•
Zero To Hero Stable Diffusion DreamBooth Tutorial By Using Automatic1111 Web UI - Ultra Detailed
Our Discord : https://discord.gg/HbqgGaZVmr. The most advanced tutorial of Stable Diffusion Dreambooth Training. 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 I am explaining from scratch to very advanced level how to use #Automatic1111 Web UI and D8ahazard #DreamBooth extension to teach new subjects, e.g. your face into a model. Moreover, I am showing how to inject your taught face into a completely new model e.g. Protogen x3.4 to produce awesome quality images without wasting too much time on finding correct prompts. Automatic1111 https://github.com/AUTOMATIC1111/stable-diffusion-webui How to install Web UI: https://youtu.be/AZg6vzWHOTA How to use #StableDiffusion different models on Web UI: https://youtu.be/aAyvsX-EpG4 Official SD v1-5-pruned : https://bit.ly/sd15ckpt How To Do LoRA Training: https://youtu.be/mfaqqL5yOO4 Wiki Ram memory: http://bit.ly/3IqFUeW Rare tokens: https://bit.ly/SDRareTokens Rare tokens list: https://bit.ly/SDRareTokensList Basics wiki: http://bit.ly/3Yy78pn DreamBooth paper https://arxiv.org/pdf/2208.12242.pdf Best caption: https://bit.ly/bestcaption2 0:00 Introduction to Grand Master yet most beginner friendly Stable Diffusion Dreambooth tutorial by using Automatic1111 Web UI 3:11 How to install DreamBooth extension to the Web UI 4:09 How to update installed extensions on the Web UI 4:35 Introduction to DreamBooth extension tab 4:45 Training model generation for DreamBooth 5:34 How to download official SD model files 6:21 Training model selection and settings tab of the DreamBooth extension 7:36 What is training steps per image epochs 8:24 Checkpoint saving frequency 9:15 What is training batch size in DreamBooth training and how to set them properly 10:47 Set gradients to none when zeroing 11:24 Gradient checkpoint 12:04 Image processing and resolution 12:39 Horizontal flip and Center crop 12:50 What is Sanity sample prompt and how to utilize it to understand overtraining 13:30 Best options to set in Advanced tab of DreamBooth extension 14:22 Step Ratio of Text Encoder Training 14:49 Concepts tab of the DreamBooth extension 15:27 How to crop images from any position with Paint .NET or use Birme .NET 17:22 Setting training dataset directory 17:44 What are classification images 18:46 What is Instance prompt 19:05 How to and why to pick your instance prompt as a very rare word (very crucial) 21:52 Class of the subject 22:15 Everything about class prompt 22:55 Sample prompt 23:30 Clas images per instance 25:00 Number of samples to generate 26:27 Teach multiple concepts in 1 run 28:24 Saving tab 29:10 How to generate checkpoints during training 30:52 Generating class images before start training 33:28 What is batch size in txt2img tab 36:09 Start training 38:25 First samples/previews of training 39:13 Sanity prompt sample 39:54 How to understand overtraining with sanity samples 40:34 How to properly prepare your training dataset images 43:15 Checkpoint saving during training 44:30 What is Lr displayed in cmd during training 45:38 How to continue / resume training if an error occurs or you cancel it 46:41 We started to overtraining and how we understood it 48:24 How to start generating our subject (face) images from best trained checkpoint 50:09 What is prompt strength / attention / emphasis and how to increase it 51:17 How to increase image quality with negative prompts 51:50 How to get your taught subject with which correct prompting 52:31 What is CFG and why should we increase it 52:54 How to try multiple CFG scale values by using X/Y prompting 54:54 Analyzing CFG effect 56:03 How to test different artist styles with different CFG scales by using X/Y plot 1:00:47 How to use prompt matrix 1:02:54 Prompts from file or text box to test many different prompts 1:03:57 Generate thousands of images while sleeping 1:04:22 PNG info to learn used prompts, CFG, seed and others 1:07:00 Extras tab to upscale images by using AI models with awesome quality 1:09:54 How improve eyes and face quality by using GFPGAN 1:11:35 How to continue training from any saved ckpt checkpoint 1:12:06 How to upload your trained model to Google Colab to use 1:14:19 How to teach a new subject to your already trained model 1:15:55 How to use filewords for training 1:21:52 What is fine tuning and how it is done 1:23:10 Hybrid training 1:24:39 How to understand out of memory error 1:25:39 Lowest GPU VRAM settings 1:27:35 How to batch preprocess images 1:31:47 How to generate very correct descriptions by using GIT large model 1:33:19 How to inject your trained subject into any custom / new model 1:37:36 Where is model hash written and how to compare
https://www.youtube.com/watch?v=Bdl-jWR3Ukc&list=PL_pbwdIyffsmclLl0O144nQRnezKlNdx3&index=5
Stable Diffusion
https://14fcf540-4201-47d7.gradio.live/

0. Introduction

Stable Diffusion 1.5 vervion์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ณธ์ธ์˜ selfie๋ฅผ ํ•™์Šต์‹œํ‚ค๋Š” ๊ณผ์ •์„ Automatic1111 WebUI๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ณด์—ฌ์ค€๋‹ค. SD2.1 ๋ฒ„์ „์—์„œ๋„ ๋ณธ ์˜์ƒ๊ณผ ๋™์ผํ•œ ๊ณผ์ •์œผ๋กœ ํ•™์Šต์‹œํ‚ฌ ์ˆ˜ ์žˆ๋‹ค.

๋ณธ ํŠœํ† ๋ฆฌ์–ผ์—์„œ๋Š” ์ž˜ ์ปค์Šคํ…€๋œ ๋ชจ๋ธ Protogen x3.4 version์„ ์‚ฌ์šฉํ•œ๋‹ค. ๋ณธ ์˜์ƒ์—์„œ ์†Œ๊ฐœํ•  model์— injection ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ์–ด๋–ค model์—๋„ ์ ์šฉ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

1. How to install and update DreamBooth extensions

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

๋ณธ ์˜์ƒ์€ 20230107์ผ ๊ธฐ์ค€์œผ๋กœ ์ฐํžŒ ์˜์ƒ์ด๋‹ค. ์œ„ repo๋ฅผ clone ํ•˜์—ฌ colab์ด๋‚˜ local machine์—์„œ ์‹คํ–‰์‹œํ‚ค๋ฉด ๋œ๋‹ค.

๋จผ์ € webUI ๋ฅผ ์‹คํ–‰ ์‹œํ‚ค๊ณ  DeamBooth Extension์„ ์„ค์น˜ํ•œ๋‹ค.

์œ„์™€ ๊ฐ™์ด ๋งจ ์˜ค๋ฅธ์ชฝ ํƒญ์˜ Extensions ๋ฅผ ํด๋ฆญํ•˜๋ฉด ๋œ๋‹ค.

์œ„์™€ ๊ฐ™์ด DreamBooth ๋ฅผ ๊ฒ€์ƒ‰ํ•ด์„œ ์˜ค๋ฅธ์ชฝ์— install์„ ํด๋ฆญํ•œ๋‹ค. (์ž˜ ์•ˆ๋˜๋ฉด webUI๋ฅผ ๊ป๋‹ค๊ฐ€ ์ผ ๋‹ค ) ์ดํ›„ ์ƒ๋‹จ์˜ Check for updates๋ฅผ ํด๋ฆญํ•œ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ƒ๋‹จ์˜ ํƒญ์—์„œ DreamBooth ๋ฅผ ์ฐพ์•„์„œ ํด๋ฆญํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ interface๋ฅผ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

2. Training Model Generation for DreamBooth

์šฐ๋ฆฌ๊ฐ€ ํ•™์Šต ์‹œํ‚ค๊ณ  ์‹ถ์€ Model์„ ๋จผ์ € Create ํ•ด์•ผํ•œ๋‹ค. ์ด๋ฆ„์€ ๋ญ๋กœ ์ง“๋“  ์ƒ๊ด€์—†๋‹ค. (๊ณต๋ฐฑ X, ํ•œ๊ธ€ X ๊ถŒ์žฅ)

๋จผ์ € ์šฐ๋ฆฌ๊ฐ€ ํ•™์Šต ์‹œํ‚ค๊ณ ์ž ํ•˜๋Š” Model์„ ๋จผ์ € ๋‹ค์šด๋กœ๋“œ ๋ฐ›์•„์•ผํ•œ๋‹ค. https://huggingface.co/runwayml/stable-diffusion-v1-5/tree/main ์— ์ ‘์†ํ•ด์„œ

Files and versions ๋ฅผ ํด๋ฆญํ•˜๊ณ 

v1-5-pruned.ckpt ์—์„œ ์•„๋ž˜๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋Š” ๋‹ค์šด๋กœ๋“œ ํ™”์‚ดํ‘œ โ†’ ๋ฅผ ์šฐํด๋ฆญํ•˜์—ฌ ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ•œ๋‹ค. ํ„ฐ๋ฏธ๋„๋กœ ๋Œ์•„๊ฐ€ stable-diffusion-webui/models/Stable-diffusion ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์ด๋™ํ•˜๊ณ 

wget ๋ณต์‚ฌํ•œ ์ฃผ์†Œ 

๋ฅผ ์ž…๋ ฅํ•˜๊ณ  ์‹คํ–‰ํ•œ๋‹ค.

์œ„์™€ ๊ฐ™์ด ์„ค์น˜๊ฐ€ ๋˜๋ฉด ๋ชจ๋ธ์„ ์ƒ์„ฑํ•œ๋‹ค. ์ด๋ฆ„์€ ์ƒ๊ด€์—†๊ณ  (๊ณต๋ฐฑX, ํ•œ๊ธ€X) ๋ชจ๋ธ๋กœ ๋ฐฉ๊ธˆ ๋‹ค์šด๋กœ๋“œ ๋ฐ›์€ v1-5-pruned.ckpt๋ฅผ ์„ ํƒํ•œ๋‹ค.

Pre 3. Preparing dataset

๋ณธ ํŠœํ† ๋ฆฌ์–ผ์—์„œ๋Š” 12์žฅ์˜ ์ด๋ฏธ์ง€๋กœ ํ•™์Šต์„ ์‹œํ‚จ๋‹ค. ์ด๋•Œ input ์ด๋ฏธ์ง€์˜ ํฌ๊ธฐ๋Š” 512x512๊ฐ€ ์ ๋‹นํ•˜๋‹ค. ์ด์™€ ๊ฐ™์ด ์ „์ฒ˜๋ฆฌ๋ฅผ ์œ„ํ•ด

BIRME - Bulk Image Resizing Made Easy 2.0 (Online & Free)
BIRME is a flexible and easy to use bulk image resizer. It can resize multiple images to any specific dimension and crop images if necessary. It's an online tool and you don't need to download or install on your computer. BIRME is absolutely free to use. It works on both Mac and Windows machines.
https://www.birme.net/

๋ฅผ ์ด์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ์ ๋‹นํ•œ ์–ผ๊ตด์„ ์ž˜๋ผ๋‚ด์–ด 512x512๋กœ ์ €์žฅํ•œ๋‹ค.

3. Training model selection and settings tab of the DreamBooth extension

Create ์˜†์— ์žˆ๋Š” Select ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๊ณ  ๊ฐ€์šด๋ฐ ์„น์…˜์— ์žˆ๋Š” Performance Wizard (WIP)๋ฅผ ํด๋ฆญํ•œ๋‹ค.

  • VRAM์˜ size๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ ๋งŒ์•ฝ 12GB๋ณด๋‹ค ์ž‘๋‹ค๋ฉด DreamBooth๋ฅผ ํ•™์Šต์‹œํ‚ค๊ธฐ ์–ด๋ ต๋‹ค. (๋ณธ ์˜ˆ์ œ๋Š” ์šฐ๋ ์ด ์ŠคํŽ™)
  • Settings ์…‹ํŒ….
์ดํ›„ Class Batch Size๋Š” 5๋กœ ๋ณ€๊ฒฝ๋จ.

  • Step Ratio of Text Encoder Training์˜ ๊ฐ’์€ face์˜ ๊ฒฝ์šฐ 0.07, style์˜ ๊ฒฝ์šฐ 0.02๊ฐ€ ์ ๋‹นํ•˜๋‹ค๊ณ  ํ•œ๋‹ค.
  • Concept ์…‹ํŒ…

Pre 3. ์—์„œ ์ƒ์„ฑํ–ˆ๋˜ ๋ฐ์ดํ„ฐ์…‹์„ ์ €์žฅํ•œ path๋ฅผ Dataset Directory์— ์ธ์ž๋กœ ์ค€๋‹ค. Classification Dataset ์ด๋ž€ ํ•™์Šตํ•˜๊ณ ์ž ํ•˜๋Š” ๋ชจ๋ธ์ด overfit ๋˜์ง€ ์•Š๋„๋ก ์ž…๋ ฅ์œผ๋กœ ์ฃผ๋Š” ์ด๋ฏธ์ง€์˜ generalํ•œ ์ด๋ฏธ์ง€๋“ค์„ ์ธ์ž๋กœ ์ฃผ๋Š” ๊ฒƒ์ด๋‹ค. ์ผ๋‹จ์€ girl ์ด๋ผ๋Š” ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์„ค์ •ํ•œ๋‹ค. (e.g. /home/joono/media2/stable-diffusion-webui/datasets/girl)

๋‹ค์Œ์€ Instance Token๊ณผ Class Token์„ ์„ค์ • ํ•ด์•ผํ•œ๋‹ค. Instance Token์€ ์•ž์œผ๋กœ ๋ชจ๋ธ์ด ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•  ๋•Œ trigger ์—ญํ• ์„ ํ•œ๋‹ค. ๋”ฐ๋ผ์„œ unique ํ•˜๊ณ  rareํ•œ ํ† ํฐ์„ ์‚ฌ์šฉํ•ด์•ผํ•˜๋Š”๋ฐ reddit์˜ thread์— uniqueํ•œ ํ† ํฐ๋“ค์„ ๋ชจ์•„๋‘” ํŽ˜์ด์ง€๊ฐ€ ์žˆ์œผ๋‹ˆ ์ด๋ฅผ ์ฐธ๊ณ ํ•˜์ž.

dreambooth-tokens/all_single_tokens_to_4_characters.txt at main ยท 2kpr/dreambooth-tokens
Contribute to 2kpr/dreambooth-tokens development by creating an account on GitHub.
https://github.com/2kpr/dreambooth-tokens/blob/main/all_single_tokens_to_4_characters.txt
โ—
๋ณธ ํŠœํ† ๋ฆฌ์–ผ์—์„œ๋Š” ohwx ํ† ํฐ์„ ์‚ฌ์šฉํ•œ๋‹ค.
  • token ์„ ํƒ์€ ์•„์ฃผ ์ค‘์š”ํ•œ๋‹ค. ์ด๋Š” ๋ชจ๋ธ์ด ํ•™์Šตํ•  ๋•Œ ์ด token์œผ๋กœ ๋ถ€ํ„ฐ ํ•™์Šต์ด ๋˜๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

Class Token์€ ๋ชจ๋ธ์ด ์˜ค๋ฒ„ํ”ผํŒ…๋˜์ง€ ์•Š๊ณ  ๋ชจ๋ธ์ด ์—ฌ์ „ํžˆ ๋ชจ๋ธ์„ ์ž˜ ์ƒ์„ฑํ•˜๋„๋ก (keep sanity of model) ๋„์™€์ฃผ๋Š” ์—ญํ• ์„ ํ•œ๋‹ค. (๋…ผ๋ฌธ์„ ์ฝ์–ด๋ด์•ผ ๋ฌด์Šจ ๊ธฐ๋Šฅ์„ ํ•˜๋Š”์ง€ ์ •ํ™•ํžˆ ์ดํ•ดํ•  ์ˆ˜ ์žˆ์„ ๋“ฏ)

Sample Image Prompt ๋Š” ํ•™์Šต ์ค‘์— ์ƒ์„ฑํ•  ์ด๋ฏธ์ง€์˜ prompt๋ฅผ ์˜๋ฏธํ•œ๋‹ค. ๋‹ค๋ฅธ style์˜ ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•ด๋ด„์œผ๋กœ์จ ๋ชจ๋ธ์ด ์–ผ๋งˆ๋‚˜ ์ž˜ ํ•™์Šตํ•˜๋Š”์ง€ ํŒŒ์•…ํ•˜๊ธฐ ์œ„ํ•จ์ด๋‹ค.
  • ์œ„์™€ ๊ฐ™์ด ์…‹ํŒ…ํ•œ๋‹ค.

Classification์„ ์œ„ํ•œ ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•  ๋•Œ ํ•œ ๋ฒˆ์— ์–ผ๋งˆ๋‚˜ ๋งŽ์€ image๋ฅผ ์ƒ์„ฑํ•˜๋Š”์ง€์— ๋Œ€ํ•œ ๊ฐ’์„ Setting ํƒญ์˜ Class Batch Size ๋ฅผ ํ†ตํ•ด ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ๋‹ค. ๋ณธ ํŠœํ† ๋ฆฌ์–ผ์—์„œ๋Š” ์ด๋ฅผ 5๋กœ ๋‘”๋‹ค.

โ—
Concept์„ ์—ฌ๋Ÿฌ๊ฐœ ์„ค์ •ํ•˜๋ฉด ์—ฌ๋Ÿฌ๊ฐœ์˜ face๋“ค์„ ํ•™์Šตํ•  ์ˆ˜๋„ ์žˆ๋‹ค.
  • Saveing ์…‹ํŒ…

4. Training

Training์— ์•ž์„œ ๋จผ์ € Class Image๋“ค์„ ์ƒ์„ฑํ•ด์•ผํ•œ๋‹ค.

Generate Class images ๋ฅผ ํด๋ฆญํ•˜๋ฉด ํ•™์Šต์— ์‚ฌ์šฉ๋  class ์ด๋ฏธ์ง€๋“ค์ด ์ƒ์„ฑ๋œ๋‹ค. (์šฐ๋ ์ด์—์„œ ์•ฝ 30๋ถ„ ์†Œ์š”)

์ดํ›„ Train ๋ฒ„ํŠผ์„ ํด๋ฆญํ•œ๋‹ค.

  • Settings tab์—์„œ Sanity Sample Prompt ๋ฅผ A photo of ohwx girl by Tomer Hanuka ์™€ ๊ฐ™์ด ์ฃผ์—ˆ๋‹ค. ์ด๋Š” ํ•™์Šต ์ค‘์— ์ƒ์„ฑํ•˜๋Š” sample์˜ prompt์ธ๋ฐ ์ด๋ฅผ ์ ์ ˆํ•œ style์„ ์ถ”๊ฐ€ํ•œ ์ด๋ฏธ์ง€๋ฅผ ํ†ตํ•ด ํ•™์Šต๋œ ๋ชจ๋ธ์˜ overfit์˜ ์—ฌ๋ถ€๋ฅผ ํŒ๋‹จํ•  ์ˆ˜ ์žˆ๋‹ค.

5. Create images using trained model

  • Prompt
    • (Optional) Prompt Generator ์‚ฌ์šฉ

      ๋จผ์ € Prompt Generator extension์„ ์„ค์น˜ํ•œ๋‹ค.

      Generate ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ๋‹ค์–‘ํ•œ ๊ฒฐ๊ณผ๋“ค์„ ๋งŒ๋“ค์–ด์ค€๋‹ค.

      ์›ํ•˜๋Š” prompt๋ฅผ ๊ณจ๋ผ ์ ์ ˆํžˆ ์‚ฌ์šฉํ•œ๋‹ค.

    • Negative Prompt
      • ๋” ์ข‹์€ ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•˜๊ธฐ ์œ„ํ•ด Negative Prompt ๋ฅผ ์„ค์ •ํ•  ํ•„์š”๊ฐ€ ์žˆ๋‹ค. The Most Complete Guide to Stable Diffusion Parameters โ€“ OpenArt Blog ๋ธ”๋กœ๊ทธ์—์„œ portrait์— ๋Œ€ํ•œ negative prompt๋ฅผ ์ฐพ์•„๋ณผ ์ˆ˜ ์žˆ๋‹ค.
        General negative prompts: 
        lowres, error, cropped, worst quality, low quality, 
        jpeg artifacts, out of frame, watermark, signature
        
        Negative prompts for people portraits: 
        deformed, ugly, mutilated, disfigured, text, extra limbs, face cut, 
        head cut, extra fingers, extra arms, poorly drawn face, mutation, 
        bad proportions, cropped head, malformed limbs, mutated hands, 
        fused fingers, long neck
        
        Negative prompts for photorealistic images: 
        illustration, painting, drawing, art, sketch
  • Attention / Emphasis
    • ๋‹จ์–ด๋ฅผ ((๋‹จ์–ด)) or (๋‹จ์–ด), (๋‹จ์–ด:1.25)์™€ ๊ฐ™์ด ๊ฐ•์กฐํ•˜๊ณ  ์‹ถ์€ ๋ถ€๋ถ„์„ ๊ฐ•์กฐํ•  ์ˆ˜ ์žˆ๋‹ค.
  • CFG Scale
    • Classifier Free Guidance scale
    • ์ด๋ฏธ์ง€๊ฐ€ prompt์— ์–ผ๋งˆ๋‚˜ ์ •ํ™•ํ•˜๊ฒŒ ๋งž์ถฐ์ง€๋Š”์ง€์— ๋Œ€ํ•œ ๊ฐ’์ด๋‹ค. ์ž‘์„ ์ˆ˜๋ก ๋”์šฑ ์ฐฝ์˜์ ์ธ ๊ฒฐ๊ณผ๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ๋‹ค. ์ž์„ธํ•œ prompt์—๋Š” ์ ์ ˆํžˆ ์ž‘์€ CFG scale๊ฐ’์„ ์ฃผ์–ด์•ผํ•œ๋‹ค.
  • ์—ฌ๋Ÿฌ parameters ๋ฅผ ๋ฐ”๊ฟ”๊ฐ€๋ฉฐ ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•ด์„œ plot์œผ๋กœ ๊ทธ๋ ค๋ณผ ์ˆ˜ ์žˆ๋‹ค.
    • X/Y/Z plot ๊ธฐ๋Šฅ ์‚ฌ์šฉ. (e.g. )

6. Upscale to better quality of image

Extra tab์— ๊ฐ€์„œ upscale์„ ํ•  ์ˆ˜ ์žˆ๋‹ค.

Upscaler ๋กœ๋Š” R-ESRGAN, LDSR ๋“ฑ์„ ์‚ฌ์šฉํ•ด๋ณด๋ผ๊ณ  ํ•˜๋Š”๋ฐ ์‹คํ—˜์œผ๋กœ ์•„๋ฌด๊ฑฐ๋‚˜ ํ•ด๋ด๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™๋‹ค.

7. How to use filewords for training

๊ฐ ์‚ฌ์ง„์˜ caption์„ ์ถ”์ถœํ•˜์—ฌ ์ด๋ฅผ ํ•™์Šต์— ์ด์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

Comparing Captioning Models - a Hugging Face Space by nielsr
Discover amazing ML apps made by the community
https://huggingface.co/spaces/nielsr/comparing-captioning-models
์œ„ ๋งํฌ์—์„œ ์›น ๋ฐ๋ชจ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์บก์…˜์„ ๋”ฐ์˜ฌ ์ˆ˜ ์žˆ์Œ.

ํ˜น์€ Train Tab์—์„œ Preprocessing images tab์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

๐Ÿ’ก
ํ•˜์ง€๋งŒ ์–ผ๊ตด์„ ํ•™์Šต์‹œํ‚ฌ ๋•Œ๋Š” ์ง์ ‘ ํ•˜๋‚˜ํ•˜๋‚˜ ๊ฒ€์ˆ˜ํ•˜์—ฌ ์บก์…˜์„ ๋งŒ๋“œ๋Š”๊ฒŒ ๋” ์ข‹์€ ๋ชจ๋ธ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค.

8. How to inject our face into custom model? Checkpoint Merger

default SD ๋ชจ๋ธ์ด ์•„๋‹Œ ์‚ฌ์šฉ์ž๋“ค์ด ํ•™์Šต ์‹œ์ผœ๋†“์€ ์ข‹์€ ๋ชจ๋ธ์— ์šฐ๋ฆฌ ๋ชจ๋ธ์„ ์ถ”๊ฐ€ํ•ด๋ณด์ž ๋จผ์ € ์•„๋ž˜ ์‚ฌ์ดํŠธ์—์„œ ์ ์ ˆํ•œ ๋ชจ๋ธ์„ ๋‹ค์šด๋กœ๋“œ ๋ฐ›๋Š”๋‹ค (ํ›„๋ฐฉ ์ฃผ์˜..)

Deliberate | Stable Diffusion Checkpoint | Civitai
Deliberate All in One / Any Case Version This model provides you the ability to create anything you want. The more power of prompt knowledges you h...
https://civitai.com/models/4823/deliberate

์•„๋ž˜์™€ ๊ฐ™์ด ๋‹ค์šด๋กœ๋“œ ๋ฐ›์€ ๋ชจ๋ธ์„ primary model์—, ์šฐ๋ฆฌ๊ฐ€ ํ•™์Šต์‹œํ‚จ ๋ชจ๋ธ์„ secondary model์— ๋„ฃ๊ณ  multimplier๋Š” 0.75๋กœ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์ด ์ข‹๋‹ค๊ณ  ์•Œ๋ ค์ ธ์žˆ๋‹ค๊ณ  ํ•œ๋‹ค.

9. ControlNet

Extension์—์„œ ControlNet์„ ์„ค์น˜ํ•œ๋‹ค.

lllyasviel/ControlNet at main
Weโ€™re on a journey to advance and democratize artificial intelligence through open source and open science.
https://huggingface.co/lllyasviel/ControlNet/tree/main/models
  • ์œ„ hugging face ํŽ˜์ด์ง€์—์„œ ์‚ฌ์šฉํ•˜๋ ค๊ณ  ํ•˜๋Š” ๋ชจ๋ธ์„ ๋‹ค์šด ๋ฐ›์•„์„œ models/ControlNet/ ์•„๋ž˜์— ์ €์žฅํ•œ๋‹ค.

์œ„์— ์ฒดํฌ๋ผ์žˆ๋Š” Enable ๋ฒ„ํŠผ์„ ์ผœ๊ณ  ๋„๊ธฐ๋งŒ ํ•˜๋ฉด ๋œ๋‹ค. ez..


Uploaded by N2T

๋ฐ˜์‘ํ˜•
๋Œ“๊ธ€์ˆ˜0