Skip to content

Commit

Permalink
max_grad_norm value limit removal for sd3
Browse files Browse the repository at this point in the history
  • Loading branch information
bghira committed Dec 11, 2024
1 parent eb80f5f commit f2736cd
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 f2736cd

Please sign in to comment.