diff --git a/README.md b/README.md index bd91eed..4d6d830 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,40 @@ C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin으로 복사합니 - 현재 사용가능한 다운로드 주소는 아래와 같습니다. - https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors +## 학습방법 1: 폴더명 규칙 사용 (자동) +./train.sh config.json 0 + +# 방법 2: 강제로 15번 반복 +./train.sh config.json 0 15 + +# 방법 3: 강제로 20번 반복 +./train.sh config.json 0 20 + + +3가지 요소 비교 +1️⃣ 폴더 식별자 (예: 15_alice) +목적: Kohya 학습 시스템이 이미지를 분류하고 관리하는 용도 +training/ +├── 15_alice/ ← "alice"는 내부 식별용 +│ ├── img1.jpg +│ └── img1.txt +└── 10_background/ ← "background"는 내부 식별용 + ├── bg1.jpg + └── bg1.txt +특징: + +학습 시 로그에만 표시됨 +LoRA 모델이나 trigger word와 무관 +단순히 폴더 구분용 + +2️⃣ --output_name (예: karina) +목적: 저장되는 LoRA 파일명 + +3️⃣ LoRA 태그명 +- 학습에 사용되는 캡션 tag + 문장에서 가장 많이 발견되는 Unique Word가 태그명이 됩니다. +- 일반적으로 캡션의 제일 앞에 배치하고 그 뒤에 콤마를 찍고 나머지를 서술합니다. + + 이 저장소에는 Stable Diffusion용 훈련, 생성 및 유틸리티 스크립트가 포함되어 있습니다. diff --git a/config_files/config-5080.json b/config_files/config-5080.json deleted file mode 100644 index 897f38f..0000000 --- a/config_files/config-5080.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "general": { - "shuffle_caption": true, - "caption_extension": ".txt", - "keep_tokens": 1, - "seed": 47 - }, - "model": { - "pretrained_model_name_or_path": "stabilityai/stable-diffusion-xl-base-1.0", - "vae": "stabilityai/sd-vae-ft-mse" - }, - "training": { - "resolution": "768,768", - "batch_size": 1, - "learning_rate": 0.00015, - "lr_scheduler": "cosine_with_restarts", - "max_train_steps": 4000, - "optimizer": "adamw8bit", - "mixed_precision": "fp16", - "gradient_checkpointing": true, - "clip_skip": 2, - "network_dim": 32, - "network_alpha": 16, - "save_precision": "fp16", - "save_every_n_steps": 1000 - }, - "folders": { - "train_data_dir": "./data/training", - "reg_data_dir": "./data/reg", - "output_dir": "./output_5080", - "logging_dir": "./logs_5080" - }, - "advanced": { - "bucket_reso_steps": 64, - "bucket_no_upscale": true, - "xformers": true, - "cache_latents": true, - "min_bucket_reso": 320, - "max_bucket_reso": 768 - } - } - \ No newline at end of file diff --git a/config_files/config-5090.json b/config_files/config-5090.json deleted file mode 100644 index cf441b5..0000000 --- a/config_files/config-5090.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "general": { - "shuffle_caption": true, - "caption_extension": ".txt", - "keep_tokens": 1, - "seed": 47 - }, - "model": { - "pretrained_model_name_or_path": "stabilityai/stable-diffusion-xl-base-1.0", - "vae": "stabilityai/sd-vae-ft-mse" - }, - "training": { - "resolution": "1024,1024", - "batch_size": 2, - "learning_rate": 0.0001, - "lr_scheduler": "cosine_with_restarts", - "max_train_steps": 6000, - "optimizer": "adamw8bit", - "mixed_precision": "bf16", - "gradient_checkpointing": false, - "clip_skip": 2, - "network_dim": 64, - "network_alpha": 32, - "save_precision": "bf16", - "save_every_n_steps": 1000 - }, - "folders": { - "train_data_dir": "./data/training", - "reg_data_dir": "./data/reg", - "output_dir": "./output_5090", - "logging_dir": "./logs_5090" - }, - "advanced": { - "bucket_reso_steps": 64, - "bucket_no_upscale": true, - "xformers": true, - "cache_latents": true, - "min_bucket_reso": 512, - "max_bucket_reso": 1024 - } -} diff --git a/docker-build.cmd b/docker-build.cmd index a9bdf76..be79128 100644 --- a/docker-build.cmd +++ b/docker-build.cmd @@ -1,3 +1,3 @@ -docker build --no-cache -t aicompanion/sdxl_train_captioner:0.8.6 . +docker build --no-cache -t aicompanion/sdxl_train_captioner:0.8.7 . -docker tag aicompanion/sdxl_train_captioner:0.8.6 aicompanion/sdxl_train_captioner:latest \ No newline at end of file +docker tag aicompanion/sdxl_train_captioner:0.8.7 aicompanion/sdxl_train_captioner:latest \ No newline at end of file diff --git a/sd-scripts b/sd-scripts index 1614bc4..9f1d862 160000 --- a/sd-scripts +++ b/sd-scripts @@ -1 +1 @@ -Subproject commit 1614bc4863161f270a89e466cd30aa8891192447 +Subproject commit 9f1d862c6065dbc2407a4a43a5a82fc83e1de985