Upload furry/cuihongshi/cuihongshi3/ with huggingface_hub
Browse files- furry/cuihongshi/cuihongshi3/cuihongshi-000001.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000002.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000003.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000004.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000005.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000006.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000007.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000008.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000009.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000010.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000011.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000012.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000013.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi-000014.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/cuihongshi.safetensors +3 -0
- furry/cuihongshi/cuihongshi3/logs/cuihongshi20230723152603/network_train/events.out.tfevents.1690126075.b8bafbd5151c.2575.0 +3 -0
- furry/cuihongshi/cuihongshi3/logs/cuihongshi20230723152910/network_train/events.out.tfevents.1690126263.b8bafbd5151c.3440.0 +3 -0
- furry/cuihongshi/cuihongshi3/logs/cuihongshi20230723154207/network_train/events.out.tfevents.1690127033.b8bafbd5151c.6776.0 +3 -0
- furry/cuihongshi/cuihongshi3/train.sh +153 -0
furry/cuihongshi/cuihongshi3/cuihongshi-000001.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e958844afea95fd7836d97fe07cce6b65c44460f4f4ee95c981d52b06239cc61
|
3 |
+
size 51910610
|
furry/cuihongshi/cuihongshi3/cuihongshi-000002.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e32e624f0524ab15a32d51119c301e8665bb8e9644d46c701ea812a84905715a
|
3 |
+
size 51910610
|
furry/cuihongshi/cuihongshi3/cuihongshi-000003.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a327f114bbce308dd55324c43d7f54cfd0d9026fd9f804516a5538a9c03c91d1
|
3 |
+
size 51910610
|
furry/cuihongshi/cuihongshi3/cuihongshi-000004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:92a0b09ce60eb6ec5b9cf231acec7abd8278915f1f2c1aa252b868032f599a12
|
3 |
+
size 51910610
|
furry/cuihongshi/cuihongshi3/cuihongshi-000005.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:95aec8f6dbed21a42600b069ca88aa4be03d7b67b92c14eb2c88df1a965454e4
|
3 |
+
size 51910609
|
furry/cuihongshi/cuihongshi3/cuihongshi-000006.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c84a5596b8fba38a9f959481c9d27a3ae53ad201ab62d5ff832fe3b2e8e19903
|
3 |
+
size 51910610
|
furry/cuihongshi/cuihongshi3/cuihongshi-000007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:224045aac85f48fce20d5f4eee1efe732ec337d71715628e7553831f906cc94a
|
3 |
+
size 51910609
|
furry/cuihongshi/cuihongshi3/cuihongshi-000008.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b04e7ed35f162c23af4f69b27f86b843489126175e83b8062a3b987026fc8ce2
|
3 |
+
size 51910610
|
furry/cuihongshi/cuihongshi3/cuihongshi-000009.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:36b306b90c109ee7eaa618bdc2ea5fe6b8c6a19005da2e07864dde79ab2ff680
|
3 |
+
size 51910610
|
furry/cuihongshi/cuihongshi3/cuihongshi-000010.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:867a1ec1dee6f563e009cfe63b3f2d3b37b2e22a4893dcbadc76d4cb6c7e7052
|
3 |
+
size 51910612
|
furry/cuihongshi/cuihongshi3/cuihongshi-000011.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:eba50436c370914611e3f38a1390d2f78f933dd164bce5b771e3496d83219cb1
|
3 |
+
size 51910612
|
furry/cuihongshi/cuihongshi3/cuihongshi-000012.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:de40dcdfc21cdd302cf3f162aa54086f72a57e3d8cae4dca517977efb17d7d2e
|
3 |
+
size 51910612
|
furry/cuihongshi/cuihongshi3/cuihongshi-000013.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:911400b6fb1d4ddafa59dcd368d7885b0ade599d5cb85c8aa617ef66f1cc9658
|
3 |
+
size 51910612
|
furry/cuihongshi/cuihongshi3/cuihongshi-000014.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1b7416588bd44f55a4effc8051f8973cf5405f0c2a46f1187053ca8ce2f2b5ea
|
3 |
+
size 51910611
|
furry/cuihongshi/cuihongshi3/cuihongshi.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cb84da41cd22415a3a294c0a8d7d8cd5ef4dbdace322b292ac1729c95c973e29
|
3 |
+
size 51910612
|
furry/cuihongshi/cuihongshi3/logs/cuihongshi20230723152603/network_train/events.out.tfevents.1690126075.b8bafbd5151c.2575.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b3c1dd019cf6361c9fca62282f1fcdbd40e755d7a0fa0d24cd4bdf348a305127
|
3 |
+
size 828
|
furry/cuihongshi/cuihongshi3/logs/cuihongshi20230723152910/network_train/events.out.tfevents.1690126263.b8bafbd5151c.3440.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8919d84131c7bfef7e60a6625553e5b538fc9863a6c855f3114da5d4efe3c19b
|
3 |
+
size 67164
|
furry/cuihongshi/cuihongshi3/logs/cuihongshi20230723154207/network_train/events.out.tfevents.1690127033.b8bafbd5151c.6776.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5a76398abc30b7b3347da7d982835469557453808b73aba7afe445e959053cf4
|
3 |
+
size 331902
|
furry/cuihongshi/cuihongshi3/train.sh
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
# LoRA train script by @Akegarasu
|
3 |
+
|
4 |
+
# Train data path | 设置训练用模型、图片
|
5 |
+
pretrained_model="/content/lora-scripts/sd-models/Animefull-final-pruned.ckpt" # base model path | 底模路径
|
6 |
+
is_v2_model=0 # SD2.0 model | SD2.0模型 2.0模型下 clip_skip 默认无效
|
7 |
+
parameterization=0 # parameterization | 参数化 本参数需要和 V2 参数同步使用 实验性功能
|
8 |
+
train_data_dir="/content/lora-scripts/train/aki/" # train dataset path | 训练数据集路径
|
9 |
+
reg_data_dir="" # directory for regularization images | 正则化数据集路径,默认不使用正则化图像。
|
10 |
+
|
11 |
+
# Network settings | 网络设置
|
12 |
+
network_module="lycoris.kohya" # 在这里将会设置训练的网络种类,默认为 networks.lora 也就是 LoRA 训练。如果你想训练 LyCORIS(LoCon、LoHa) 等,则修改这个值为 lycoris.kohya
|
13 |
+
network_weights="" # pretrained weights for LoRA network | 若需要从已有的 LoRA 模型上继续训练,请填写 LoRA 模型路径。
|
14 |
+
network_dim=32 # network dim | 常用 4~128,不是越大越好
|
15 |
+
network_alpha=16 # network alpha | 常用与 network_dim 相同的值或者采用较小的值,如 network_dim的一半 防止下溢。默认值为 1,使用较小的 alpha 需要提升学习率。
|
16 |
+
|
17 |
+
# Train related params | 训练相关参数
|
18 |
+
resolution="768,768" # image resolution w,h. 图片分辨率,宽,高。支持非正方形,但必须是 64 倍数。
|
19 |
+
batch_size=2 # batch size
|
20 |
+
max_train_epoches=15 # max train epoches | 最大训练 epoch
|
21 |
+
save_every_n_epochs=1 # save every n epochs | 每 N 个 epoch 保存一次
|
22 |
+
|
23 |
+
train_unet_only=0 # train U-Net only | 仅训练 U-Net,开启这个会牺牲效果大幅减少显存使用。6G显存可以开启
|
24 |
+
train_text_encoder_only=0 # train Text Encoder only | 仅训练 文本编码器
|
25 |
+
stop_text_encoder_training=0 # stop text encoder training | 在第N步时停止训练文本编码器
|
26 |
+
|
27 |
+
noise_offset="0.05" # noise offset | 在训练中添加噪声偏移来改良生成非常暗或者非常亮的图像,如果启用,推荐参数为0.1
|
28 |
+
keep_tokens=1 # keep heading N tokens when shuffling caption tokens | 在随机打乱 tokens 时,保留前 N 个不变。
|
29 |
+
min_snr_gamma=0 # minimum signal-to-noise ratio (SNR) value for gamma-ray | 伽马射线事件的最小信噪比(SNR)值 默认为 0
|
30 |
+
|
31 |
+
# Learning rate | 学习率
|
32 |
+
lr="1.5e-4"
|
33 |
+
unet_lr="1.5e-4"
|
34 |
+
text_encoder_lr="1e-5"
|
35 |
+
lr_scheduler="cosine_with_restarts" # "linear", "cosine", "cosine_with_restarts", "polynomial", "constant", "constant_with_warmup", "adafactor"
|
36 |
+
lr_warmup_steps=0 # warmup steps | 学习率预热步数,lr_scheduler 为 constant 或 adafactor 时该值需要设为0。
|
37 |
+
lr_restart_cycles=1 # cosine_with_restarts restart cycles | 余弦退火重启次数,仅在 lr_scheduler 为 cosine_with_restarts 时起效。
|
38 |
+
|
39 |
+
# Output settings | 输出设置
|
40 |
+
output_name="cuihongshi" # output model name | 模型保存名称
|
41 |
+
save_model_as="safetensors" # model save ext | 模型保存格式 ckpt, pt, safetensors
|
42 |
+
|
43 |
+
# Resume training state | 恢复训练设置
|
44 |
+
save_state=0 # save state | 保存训练状态 名称类似于 <output_name>-??????-state ?????? 表示 epoch 数
|
45 |
+
resume="" # resume from state | 从某个状态文件夹中恢复训练 需配合上方参数同时使用 由于规范文件限制 epoch 数和全局步数不会保存 即使恢复时它们也从 1 开始 与 network_weights 的具体实现操作并不一致
|
46 |
+
|
47 |
+
# 其他设置
|
48 |
+
min_bucket_reso=256 # arb min resolution | arb 最小分辨率
|
49 |
+
max_bucket_reso=1024 # arb max resolution | arb 最大分辨率
|
50 |
+
persistent_data_loader_workers=0 # persistent dataloader workers | 容易爆内存,保留加载训练集的worker,减少每个 epoch 之间的停顿
|
51 |
+
clip_skip=2 # clip skip | 玄学 一般用 2
|
52 |
+
|
53 |
+
# 优化器设置
|
54 |
+
optimizer_type="AdamW8bit" # Optimizer type | 优化器类型 默认为 AdamW8bit,可选:AdamW AdamW8bit Lion SGDNesterov SGDNesterov8bit DAdaptation AdaFactor
|
55 |
+
|
56 |
+
# LyCORIS 训练设置
|
57 |
+
algo="lora" # LyCORIS network algo | LyCORIS 网络算法 可选 lora、loha、lokr、ia3、dylora。lora即为locon
|
58 |
+
conv_dim=8 # conv dim | 类似于 network_dim,推荐为 4
|
59 |
+
conv_alpha=4 # conv alpha | 类似于 network_alpha,可以采用与 conv_dim 一致或者更小的值
|
60 |
+
dropout="0" # dropout | dropout 概率, 0 为不使用 dropout, 越大则 dropout 越多,推荐 0~0.5, LoHa/LoKr/(IA)^3暂时不支持
|
61 |
+
|
62 |
+
# 远程记录设置
|
63 |
+
use_wandb=0 # use_wandb | 启用wandb远程记录功能
|
64 |
+
wandb_api_key="" # wandb_api_key | API,通过https://wandb.ai/authorize获取
|
65 |
+
log_tracker_name="" # log_tracker_name | wandb项目名称,留空则为"network_train"
|
66 |
+
|
67 |
+
# ============= DO NOT MODIFY CONTENTS BELOW | 请勿修改下方内容 =====================
|
68 |
+
export HF_HOME="huggingface"
|
69 |
+
export TF_CPP_MIN_LOG_LEVEL=3
|
70 |
+
|
71 |
+
extArgs=()
|
72 |
+
launchArgs=()
|
73 |
+
if [[ $multi_gpu == 1 ]]; then launchArgs+=("--multi_gpu"); fi
|
74 |
+
|
75 |
+
if [[ $is_v2_model == 1 ]]; then
|
76 |
+
extArgs+=("--v2");
|
77 |
+
else
|
78 |
+
extArgs+=("--clip_skip $clip_skip");
|
79 |
+
fi
|
80 |
+
|
81 |
+
if [[ $parameterization == 1 ]]; then extArgs+=("--v_parameterization"); fi
|
82 |
+
|
83 |
+
if [[ $train_unet_only == 1 ]]; then extArgs+=("--network_train_unet_only"); fi
|
84 |
+
|
85 |
+
if [[ $train_text_encoder_only == 1 ]]; then extArgs+=("--network_train_text_encoder_only"); fi
|
86 |
+
|
87 |
+
if [[ $network_weights ]]; then extArgs+=("--network_weights $network_weights"); fi
|
88 |
+
|
89 |
+
if [[ $reg_data_dir ]]; then extArgs+=("--reg_data_dir $reg_data_dir"); fi
|
90 |
+
|
91 |
+
if [[ $optimizer_type ]]; then extArgs+=("--optimizer_type $optimizer_type"); fi
|
92 |
+
|
93 |
+
if [[ $optimizer_type == "DAdaptation" ]]; then extArgs+=("--optimizer_args decouple=True"); fi
|
94 |
+
|
95 |
+
if [[ $save_state == 1 ]]; then extArgs+=("--save_state"); fi
|
96 |
+
|
97 |
+
if [[ $resume ]]; then extArgs+=("--resume $resume"); fi
|
98 |
+
|
99 |
+
if [[ $persistent_data_loader_workers == 1 ]]; then extArgs+=("--persistent_data_loader_workers"); fi
|
100 |
+
|
101 |
+
if [[ $network_module == "lycoris.kohya" ]]; then
|
102 |
+
extArgs+=("--network_args conv_dim=$conv_dim conv_alpha=$conv_alpha algo=$algo dropout=$dropout")
|
103 |
+
fi
|
104 |
+
|
105 |
+
if [[ $stop_text_encoder_training -ne 0 ]]; then extArgs+=("--stop_text_encoder_training $stop_text_encoder_training"); fi
|
106 |
+
|
107 |
+
if [[ $noise_offset != "0" ]]; then extArgs+=("--noise_offset $noise_offset"); fi
|
108 |
+
|
109 |
+
if [[ $min_snr_gamma -ne 0 ]]; then extArgs+=("--min_snr_gamma $min_snr_gamma"); fi
|
110 |
+
|
111 |
+
if [[ $use_wandb == 1 ]]; then
|
112 |
+
extArgs+=("--log_with=all")
|
113 |
+
else
|
114 |
+
extArgs+=("--log_with=tensorboard")
|
115 |
+
fi
|
116 |
+
|
117 |
+
if [[ $wandb_api_key ]]; then extArgs+=("--wandb_api_key $wandb_api_key"); fi
|
118 |
+
|
119 |
+
if [[ $log_tracker_name ]]; then extArgs+=("--log_tracker_name $log_tracker_name"); fi
|
120 |
+
|
121 |
+
python -m accelerate.commands.launch ${launchArgs[@]} --num_cpu_threads_per_process=8 "./sd-scripts/train_network.py" \
|
122 |
+
--enable_bucket \
|
123 |
+
--pretrained_model_name_or_path=$pretrained_model \
|
124 |
+
--train_data_dir=$train_data_dir \
|
125 |
+
--output_dir="/content/drive/MyDrive/Lora/output/cuihongshi" \
|
126 |
+
--logging_dir="/content/drive/MyDrive/Lora/output/cuihongshi/logs" \
|
127 |
+
--log_prefix=$output_name \
|
128 |
+
--resolution=$resolution \
|
129 |
+
--network_module=$network_module \
|
130 |
+
--max_train_epochs=$max_train_epoches \
|
131 |
+
--learning_rate=$lr \
|
132 |
+
--unet_lr=$unet_lr \
|
133 |
+
--text_encoder_lr=$text_encoder_lr \
|
134 |
+
--lr_scheduler=$lr_scheduler \
|
135 |
+
--lr_warmup_steps=$lr_warmup_steps \
|
136 |
+
--lr_scheduler_num_cycles=$lr_restart_cycles \
|
137 |
+
--network_dim=$network_dim \
|
138 |
+
--network_alpha=$network_alpha \
|
139 |
+
--output_name=$output_name \
|
140 |
+
--train_batch_size=$batch_size \
|
141 |
+
--save_every_n_epochs=$save_every_n_epochs \
|
142 |
+
--mixed_precision="fp16" \
|
143 |
+
--save_precision="fp16" \
|
144 |
+
--seed="1337" \
|
145 |
+
--cache_latents \
|
146 |
+
--prior_loss_weight=0.3 \
|
147 |
+
--max_token_length=225 \
|
148 |
+
--caption_extension=".txt" \
|
149 |
+
--save_model_as=$save_model_as \
|
150 |
+
--min_bucket_reso=$min_bucket_reso \
|
151 |
+
--max_bucket_reso=$max_bucket_reso \
|
152 |
+
--keep_tokens=$keep_tokens \
|
153 |
+
--xformers --shuffle_caption ${extArgs[@]}
|