Skip to content

Commit e425996

Browse files
committed
feat: unify ControlNet model name option and deprecate old training script
1 parent abff4b0 commit e425996

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ The command to install PyTorch is as follows:
1515
### Recent Updates
1616

1717
Dec 7, 2024:
18+
19+
- The option to specify the model name during ControlNet training was different in each script. It has been unified. Please specify `--controlnet_model_name_or_path`. PR [#1821](https://github.com/kohya-ss/sd-scripts/pull/1821) Thanks to sdbds!
20+
<!--
21+
Also, the ControlNet training script for SD has been changed from `train_controlnet.py` to `train_control_net.py`.
22+
- `train_controlnet.py` is still available, but it will be removed in the future.
23+
-->
24+
1825
- Fixed an issue where the saved model would be corrupted (pos_embed would not be saved) when `--enable_scaled_pos_embed` was specified in `sd3_train.py`.
1926

2027
Dec 3, 2024:

train_controlnet.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from library.utils import setup_logging
2+
3+
setup_logging()
4+
import logging
5+
6+
logger = logging.getLogger(__name__)
7+
8+
9+
from library import train_util
10+
from train_control_net import setup_parser, train
11+
12+
if __name__ == "__main__":
13+
logger.warning(
14+
"The module 'train_controlnet.py' is deprecated. Please use 'train_control_net.py' instead"
15+
" / 'train_controlnet.py'は非推奨です。代わりに'train_control_net.py'を使用してください。"
16+
)
17+
parser = setup_parser()
18+
19+
args = parser.parse_args()
20+
train_util.verify_command_line_training_args(args)
21+
args = train_util.read_config_from_file(args, parser)
22+
23+
train(args)

0 commit comments

Comments
 (0)