From 30295c96686c90d4773e12fd5eb248e0a6bd406b Mon Sep 17 00:00:00 2001 From: Kohya S Date: Sun, 13 Jul 2025 21:00:27 +0900 Subject: [PATCH] fix: update parameter names for CFG truncate and Renorm CFG in documentation and code --- docs/lumina_train_network.md | 10 ++++++---- library/train_util.py | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/lumina_train_network.md b/docs/lumina_train_network.md index 45695e89..cb3b600f 100644 --- a/docs/lumina_train_network.md +++ b/docs/lumina_train_network.md @@ -269,11 +269,12 @@ Based on the contributor's recommendations, here are the suggested settings for * High image-text alignment: `"You are an assistant designed to generate high-quality images with the highest degree of image-text alignment based on textual prompts."` **Sample Prompts:** -Sample prompts can include CFG truncate (`-ct`) and Renorm CFG (`-rc`) parameters: -* `-ct 0.25 -rc 1.0` (default values) +Sample prompts can include CFG truncate (`--ctr`) and Renorm CFG (`-rcfg`) parameters: +* `--ctr 0.25 --rcfg 1.0` (default values)
日本語 + 必要な引数を設定し、コマンドを実行すると学習が開始されます。基本的な流れやログの確認方法は[`train_network.py`のガイド](train_network.md#32-starting-the-training--学習の開始)と同様です。 学習が完了すると、指定した`output_dir`にLoRAモデルファイル(例: `my_lumina_lora.safetensors`)が保存されます。このファイルは、Lumina Image 2.0モデルに対応した推論環境(例: ComfyUI + 適切なノード)で使用できます。 @@ -295,6 +296,7 @@ Sample prompts can include CFG truncate (`-ct`) and Renorm CFG (`-rc`) parameter * 高い画像-テキスト整合性: `"You are an assistant designed to generate high-quality images with the highest degree of image-text alignment based on textual prompts."` **サンプルプロンプト:** -サンプルプロンプトには CFG truncate (`-ct`) と Renorm CFG (`-rc`) パラメータを含めることができます: -* `-ct 0.25 -rc 1.0` (デフォルト値) +サンプルプロンプトには CFG truncate (`--ctr`) と Renorm CFG (`--rcfg`) パラメータを含めることができます: +* `--ctr 0.25 --rcfg 1.0` (デフォルト値) +
\ No newline at end of file diff --git a/library/train_util.py b/library/train_util.py index 1d80bcd8..2e8e9c29 100644 --- a/library/train_util.py +++ b/library/train_util.py @@ -6208,12 +6208,12 @@ def line_to_prompt_dict(line: str) -> dict: prompt_dict["controlnet_image"] = m.group(1) continue - m = re.match(r"ct (.+)", parg, re.IGNORECASE) + m = re.match(r"ctr (.+)", parg, re.IGNORECASE) if m: prompt_dict["cfg_trunc_ratio"] = float(m.group(1)) continue - m = re.match(r"rc (.+)", parg, re.IGNORECASE) + m = re.match(r"rcfg (.+)", parg, re.IGNORECASE) if m: prompt_dict["renorm_cfg"] = float(m.group(1)) continue