Skip to content

Commit

Permalink
write a random seed to metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
ddPn08 committed Apr 2, 2023
1 parent 45381b1 commit a7d302e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions train_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ def train(args):
use_dreambooth_method = args.in_json is None
use_user_config = args.dataset_config is not None

if args.seed is not None:
set_seed(args.seed)
if args.seed is None:
args.seed = random.randint(0, 2**32)
set_seed(args.seed)

tokenizer = train_util.load_tokenizer(args)

Expand Down

0 comments on commit a7d302e

Please sign in to comment.