Commit Graph

7 Commits

Author SHA1 Message Date
Rasaboun 6068a3cd43
fix: name the config key when step scheduler is missing step_size
Without step_size, StepLR raises 'missing 1 required positional argument',
which is Python-level phrasing that does not tell a config author the value
belongs under lr_scheduler_params. Raise with the config path instead.

Deliberately an error rather than a default: step_size determines the shape
of the entire lr curve, so a guessed value would train to completion and
quietly produce a worse result with no signal anything was wrong.
2026-08-07 10:31:47 +02:00
Rasaboun 8c72f4df00
fix: make constant_with_warmup tolerate a missing total_iters
Same defect as the step branch, opposite direction: the branch used an
unguarded del kwargs['total_iters'], so get_lr_scheduler raised
KeyError: 'total_iters' whenever it was called without the trainer's
injection. Switch to the same pop() used elsewhere so every branch is
safe both with and without the key.
2026-08-07 10:17:19 +02:00
Rasaboun f1d171d59a
fix: drop injected total_iters before constructing StepLR
BaseSDTrainProcess always injects lr_scheduler_params['total_iters'], but
StepLR takes only step_size/gamma/last_epoch, so any config using
lr_scheduler: "step" dies with:

    TypeError: StepLR.__init__() got an unexpected keyword argument 'total_iters'

Every other branch already copes -- cosine remaps it to T_max,
cosine_with_restarts to T_0, constant_with_warmup deletes it, and
ConstantLR/LinearLR accept it natively. Only the step branch forwards it
untouched. Step decay is fully defined by step_size/gamma and has no notion
of run length, so discarding it is the correct handling.
2026-08-07 10:06:48 +02:00
martintomov 34db804c76
Modal cloud training support, fixed typo in toolkit/scheduler.py, Schnell training support for Colab, issue #92 , issue #114 (#115)
* issue #76, load_checkpoint_and_dispatch() 'force_hooks'

https://github.com/ostris/ai-toolkit/issues/76

* RunPod cloud config

https://github.com/ostris/ai-toolkit/issues/90

* change 2x A40 to 1x A40 and price per hour

referring to https://github.com/ostris/ai-toolkit/issues/90#issuecomment-2294894929

* include missed FLUX.1-schnell setup guide in last commit

* huggingface-cli login required auth

* #92 peft, #114 colab, schnell training in colab

* modal cloud - run_modal.py and .yaml configs

* run_modal.py mount path example

* modal_examples renamed to modal

* Training in Modal README.md setup guide

* rename run command in title for consistency
2024-08-22 21:25:44 -06:00
Jaret Burkett 48a9bac22d Added doffusers schedulers 2023-10-29 12:39:50 -06:00
Jaret Burkett 22ed539321 Allow special args for schedulers 2023-09-03 20:38:44 -06:00
Jaret Burkett 66c6f0f6f7 Big refactor of SD runner and added image generator 2023-08-03 14:51:25 -06:00