Skip to content

Commit

Permalink
Merge pull request #1106 from mhirki/add-flux-schedule-auto-shift-saf…
Browse files Browse the repository at this point in the history
…ety-check

Throw an error if both --flux_schedule_auto_shift and --flux_schedule_shift are enabled.
  • Loading branch information
bghira authored Oct 27, 2024
2 parents 6962afd + 545b0c9 commit 80aafbf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions helpers/training/default_settings/safety_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,12 @@ def safety_check(args, accelerator):
f"{args.model_type} tuning is not compatible with quantisation. Please set --base_model_precision to 'no_change' or train LyCORIS/LoRA."
)
sys.exit(1)

if (
args.flux_schedule_shift is not None and args.flux_schedule_shift > 0
and args.flux_schedule_auto_shift
):
logger.error(
f"--flux_schedule_auto_shift cannot be combined with --flux_schedule_shift. Please set --flux_schedule_shift to 0 if you want to train with --flux_schedule_auto_shift."
)
sys.exit(1)

0 comments on commit 80aafbf

Please sign in to comment.