kohya-ss / kohya-ss/sd-scripts

LR becomes 0 when resumed from SaveState using Resume

Open
#141 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.2k
Forks
1.2k
Avg merge
11m
Merged PRs (30d)
2

Description

LR becomes 0 when resumed from SaveState using Resume.
it happened when using cosine_with_restarts.

日本語で失礼します。
lr_scheduler_num_cycles=3、cosine_with_restartで4エポック学習。2epoch後とラストでSAVE作成しました。
![fig_1](https://user-images.githubusercontent.com/124157844/216040133-4e4487aa-b6d5-4178-8d0c-febbc7ee63d6.png)

last stateからresumeして同じ設定で再開実行したところ4エポック全部LRが0になりました。
2エポック後からresumeした場合は1.5回分LRが増減してその後LRは0となりました。
![fig_2](https://user-images.githubusercontent.com/124157844/216040181-2dd09d88-44d8-4adb-baa9-1b1bb58bfd50.png)

cosine_with_restarts使用時に現在ステップが総ステップ数を超えるとLR0を返す挙動をしているのでしょうか?
Last Stateから再開する場合はLR増加して欲しいです

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing training with cosine_with_restarts, saving after two epochs and at the end, then resuming through SaveState and Resume. Inspect how the scheduler handles the current step beyond the total step count. Done means resumed training follows the expected learning-rate cycle instead of returning a learning rate of 0.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.