Skip to content

Commit

Permalink
feat: unify ControlNet model name option and deprecate old training s…
Browse files Browse the repository at this point in the history
…cript
  • Loading branch information
kohya-ss committed Dec 7, 2024
1 parent abff4b0 commit e425996
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ The command to install PyTorch is as follows:
### Recent Updates

Dec 7, 2024:

- 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!
<!--
Also, the ControlNet training script for SD has been changed from `train_controlnet.py` to `train_control_net.py`.
- `train_controlnet.py` is still available, but it will be removed in the future.
-->

- 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`.

Dec 3, 2024:
Expand Down
23 changes: 23 additions & 0 deletions train_controlnet.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from library.utils import setup_logging

setup_logging()
import logging

logger = logging.getLogger(__name__)


from library import train_util
from train_control_net import setup_parser, train

if __name__ == "__main__":
logger.warning(
"The module 'train_controlnet.py' is deprecated. Please use 'train_control_net.py' instead"
" / 'train_controlnet.py'は非推奨です。代わりに'train_control_net.py'を使用してください。"
)
parser = setup_parser()

args = parser.parse_args()
train_util.verify_command_line_training_args(args)
args = train_util.read_config_from_file(args, parser)

train(args)

0 comments on commit e425996

Please sign in to comment.