save_n_epoch_ratio) or 1 # 学習する total_batch_size = args.train_batch_size * accelerator.num_processes * args.gradient_accumulation_steps @@ -264,6 +266,7 @@ def train(args): "ss_keep_tokens": args.keep_tokens, "ss_dataset_dirs": json.dumps(train_dataset.dataset_dirs_info), ...
'wb')assave_file:save_file.write(requests.get(url).content)returnfilenamedeftar_xzvf(filename,path='.'):withtarfile.open(filename,'r:gz')astar_file:tar_file.extractall(path=path)deftar_tvf(filename):withtarfile.open(filename,'r:')astar_file:foriinrange(10):info=tar_...