Update README.md
Browse files
README.md
CHANGED
@@ -35,3 +35,31 @@ pipe.enable_model_cpu_offload()
|
|
35 |
image = pipe("modern anime style, A close-up shot of a girl's face in the center, looking directly at the viewer. Autumn maple trees with red leaves frame both the left and right sides of the background, with the sky visible in the middle.").images[0]
|
36 |
image.save("sd35.png")
|
37 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
image = pipe("modern anime style, A close-up shot of a girl's face in the center, looking directly at the viewer. Autumn maple trees with red leaves frame both the left and right sides of the background, with the sky visible in the middle.").images[0]
|
36 |
image.save("sd35.png")
|
37 |
```
|
38 |
+
|
39 |
+
# How to Make
|
40 |
+
|
41 |
+
## Prerequisites
|
42 |
+
- A6000x1 (48GB)
|
43 |
+
- Private dataset: 3000 images (collected manually)
|
44 |
+
|
45 |
+
## Procedure
|
46 |
+
I used sd-scripts. The dataset config as is follows:
|
47 |
+
```toml
|
48 |
+
[general]
|
49 |
+
enable_bucket = true # Aspect Ratio Bucketingを使うか否か
|
50 |
+
|
51 |
+
[[datasets]]
|
52 |
+
resolution = 1024 # 学習解像度
|
53 |
+
batch_size = 4 # バッチサイズ
|
54 |
+
|
55 |
+
[[datasets.subsets]]
|
56 |
+
image_dir = '/mnt/NVM2/manual_now' # 学習用画像を入れたフォルダを指定
|
57 |
+
metadata_file = 'manual_dcap2.json' # メタデータファイル名
|
58 |
+
|
59 |
+
```
|
60 |
+
|
61 |
+
I ran the command:
|
62 |
+
```bash
|
63 |
+
accelerate launch --num_cpu_threads_per_process 1 sd3_train.py --pretrained_model_name_or_path='/mnt/NVM2/sd3_5/sd3.5_large.safetensors' --output_dir='/mnt/NVM2/sd3_5' --output_name=modern_anime --dataset_config=twitter_dcap2.toml --save_model_as=safetensors --learning_rate=5e-6 --sdpa --gradient_checkpointing --mixed_precision=bf16 --full_bf16 --max_train_epochs=3 --min_bucket_reso=512 --max_bucket_reso=2048 --clip_l='/mnt/NVM2/sd3_5/clip_l.safetensors' --clip_g='/mnt/NVM2/sd3_5/clip_g.safetensors' --gradient_accumulation_steps=1 --t5xxl='/mnt/NVM2/sd3_5/t5xxl_fp16.safetensors' --optimizer_type=AdamW8bit --cache_text_encoder_outputs_to_disk --cache_text_encoder_outputs --cache_latents --cache_latents_to_disk --save_every_n_epochs=1
|
64 |
+
```
|
65 |
+
|