kohya-ss / kohya-ss/sd-scripts

errors in lord Realistic_Vision_V2.0.safetensors or ckpt

Open
#584 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.2k
Forks
1.2k
Avg merge
11m
Merged PRs (30d)
2

Description

I use Realistic_Vision_V2.0.safetensors as my safetensors model.
```
# Train data path | 设置训练用模型、图片
pretrained_model = "/code/Realistic_Vision_V2.0/Realistic_Vision_V2.0.safetensors"
train_data_dir = "./kewei-photos/pure/" # train dataset path | 训练数据集路径
regdata = "./handsomeman/"

# Train related params | 训练相关参数
resolution = "512,512" # image resolution w,h. 图片分辨率,宽,高。支持非正方形,但必须是 64 倍数。
batch_size = 1 # batch size
max_train_epoches = 10 # max train epoches | 最大训练 epoch
save_every_n_epochs = 2 # save every n epochs | 每 N 个 epoch 保存一次
network_dim = 64 # network dim | 常用 4~128,不是越大越好
network_alpha= 32 # network alpha | 常用与 network_dim 相同的值或者采用较小的值,如 network_dim的一半 防止下溢。默认值为 1,使用较小的 alpha 需要提升学习率。
clip_skip = 2 # clip skip | 玄学 一般用 2
train_unet_only = 0 # train U-Net only | 仅训练 U-Net,开启这个会牺牲效果大幅减少显存使用。6G显存可以开启
train_text_encoder_only = 0 # train Text Encoder only | 仅训练 文本编码器

# Learning rate | 学习率
lr = "1e-4"
unet_lr = "1e-4"
text_encoder_lr = "1e-5"
lr_scheduler = "cosine_with_restarts" # "linear", "cosine", "cosine_with_restarts", "polynomial", "constant", "constant_with_warmup"

# Output settings | 输出设置
output_name = "keweichen" # output model name | 模型保存名称
save_model_as = "safetensors" # model save ext | 模型保存格式 ckpt, pt, safetensors
# tokenizer_cache_dir = "/code/clip/"
```

and this error occur.
![image](https://github.com/kohya-ss/sd-scripts/assets/84905965/b895beb3-f618-46a0-9958-7e13dd999605)
if I use ckpt, these is another error.
![image](https://github.com/kohya-ss/sd-scripts/assets/84905965/0f2b77dd-8352-44b6-bf47-b790cac4666b)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported training run with the provided Realistic_Vision_V2.0.safetensors configuration, then compare it with the ckpt configuration and inspect the two linked error screenshots. Done means identifying the model-loading incompatibility or missing prerequisite and documenting a verified configuration that starts training.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.