Skip to content

Commit 663f0c1

Browse files
authored
[Flax] fix extra copy pasta 🍝 (huggingface#1187)
1 parent 6cf72a9 commit 663f0c1

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

examples/dreambooth/train_dreambooth_flax.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -327,22 +327,6 @@ def main():
327327
if args.seed is not None:
328328
set_seed(args.seed)
329329

330-
if jax.process_index() == 0:
331-
if args.push_to_hub:
332-
if args.hub_model_id is None:
333-
repo_name = get_full_repo_name(Path(args.output_dir).name, token=args.hub_token)
334-
else:
335-
repo_name = args.hub_model_id
336-
repo = Repository(args.output_dir, clone_from=repo_name)
337-
338-
with open(os.path.join(args.output_dir, ".gitignore"), "w+") as gitignore:
339-
if "step_*" not in gitignore:
340-
gitignore.write("step_*\n")
341-
if "epoch_*" not in gitignore:
342-
gitignore.write("epoch_*\n")
343-
elif args.output_dir is not None:
344-
os.makedirs(args.output_dir, exist_ok=True)
345-
346330
rng = jax.random.PRNGKey(args.seed)
347331

348332
if args.with_prior_preservation:

0 commit comments

Comments
 (0)