mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
fix to work with dreambooth ds without toml
This commit is contained in:
@@ -41,6 +41,7 @@ def train(args):
|
|||||||
), "cache_text_encoder_outputs is not supported when training text encoder / text encoderを学習するときはcache_text_encoder_outputsはサポートされていません"
|
), "cache_text_encoder_outputs is not supported when training text encoder / text encoderを学習するときはcache_text_encoder_outputsはサポートされていません"
|
||||||
|
|
||||||
cache_latents = args.cache_latents
|
cache_latents = args.cache_latents
|
||||||
|
use_dreambooth_method = args.in_json is None
|
||||||
|
|
||||||
if args.seed is not None:
|
if args.seed is not None:
|
||||||
set_seed(args.seed) # 乱数系列を初期化する
|
set_seed(args.seed) # 乱数系列を初期化する
|
||||||
@@ -61,6 +62,19 @@ def train(args):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
if use_dreambooth_method:
|
||||||
|
print("Using DreamBooth method.")
|
||||||
|
user_config = {
|
||||||
|
"datasets": [
|
||||||
|
{
|
||||||
|
"subsets": config_util.generate_dreambooth_subsets_config_by_subdirs(
|
||||||
|
args.train_data_dir, args.reg_data_dir
|
||||||
|
)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
else:
|
||||||
|
print("Training with captions.")
|
||||||
user_config = {
|
user_config = {
|
||||||
"datasets": [
|
"datasets": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user