Skip to content

Commit

Permalink
Merge pull request #1207 from bghira/chore/remove-sd3-grad-norm-limit
Browse files Browse the repository at this point in the history
max_grad_norm value limit removal for sd3
  • Loading branch information
bghira authored Dec 11, 2024
2 parents eb80f5f + f2736cd commit b06c4a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helpers/configuration/cmd_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -2406,10 +2406,10 @@ def parse_cmdline_args(input_args=None, exit_on_error: bool = False):
sys.exit(1)

if not args.i_know_what_i_am_doing:
if args.model_family == "pixart_sigma" or args.model_family == "sd3":
if args.model_family == "pixart_sigma":
if args.max_grad_norm is None or float(args.max_grad_norm) > 0.01:
warning_log(
f"{'PixArt Sigma' if args.model_family == 'pixart_sigma' else 'Stable Diffusion 3'} requires --max_grad_norm=0.01 to prevent model collapse. Overriding value. Set this value manually to disable this warning."
f"PixArt Sigma requires --max_grad_norm=0.01 to prevent model collapse. Overriding value. Set this value manually to disable this warning."
)
args.max_grad_norm = 0.01
if args.gradient_checkpointing:
Expand Down

0 comments on commit b06c4a3

Please sign in to comment.