From 9b0e5329425f721a3f057d0638db2dfa9aad83fa Mon Sep 17 00:00:00 2001 From: Kohya S Date: Sun, 18 Feb 2024 21:40:36 +0900 Subject: [PATCH] add command line sample --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 6e8bea4f..03b33c36 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,12 @@ Since the official settings use `bf16` for training, training with `fp16` may be The code for training the Text Encoder is also written, but it is untested. +### Command line sample + +```batch +accelerate launch --mixed_precision bf16 --num_cpu_threads_per_process 1 stable_cascade_train_stage_c.py --mixed_precision bf16 --save_precision bf16 --max_data_loader_n_workers 2 --persistent_data_loader_workers --gradient_checkpointing --learning_rate 1e-4 --optimizer_type adafactor --optimizer_args "scale_parameter=False" "relative_step=False" "warmup_init=False" --max_train_epochs 10 --save_every_n_epochs 1 --save_precision bf16 --output_dir ../output --output_name sc_test - --stage_c_checkpoint_path ../models/stage_c_bf16.safetensors --effnet_checkpoint_path ../models/effnet_encoder.safetensors --previewer_checkpoint_path ../models/previewer.safetensors --dataset_config ../dataset/config_bs1.toml --sample_every_n_epochs 1 --sample_prompts ../dataset/prompts.txt +``` + ### About the dataset for fine tuning If the latents cache files for SD/SDXL exist (extension `*.npz`), it will be read and an error will occur during training. Please move them to another location in advance. @@ -75,6 +81,11 @@ latents および Text Encoder 出力キャッシュのためのオプション Text Encoder 学習のコードも書いてありますが、未テストです。 +### コマンドラインのサンプル + +[Command-line-sample](#command-line-sample)を参照してください。 + + ### fine tuning方式のデータセットについて SD/SDXL 向けの latents キャッシュファイル(拡張子 `*.npz`)が存在するとそれを読み込んでしまい学習時にエラーになります。あらかじめ他の場所に退避しておいてください。