Skip to content

Commit 03f19f6

Browse files
committed
fix repo id
1 parent 61426f0 commit 03f19f6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/advanced_diffusion_training/train_dreambooth_lora_flux_advanced.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,9 +1468,11 @@ def main(args):
14681468
if args.output_dir is not None:
14691469
os.makedirs(args.output_dir, exist_ok=True)
14701470

1471+
model_id = args.hub_model_id or Path(args.output_dir).name
1472+
repo_id = None
14711473
if args.push_to_hub:
14721474
repo_id = create_repo(
1473-
repo_id=args.hub_model_id or Path(args.output_dir).name,
1475+
repo_id=model_id,
14741476
exist_ok=True,
14751477
).repo_id
14761478

@@ -2427,7 +2429,7 @@ def get_sigmas(timesteps, n_dim=4, dtype=torch.float32):
24272429
)
24282430

24292431
save_model_card(
2430-
repo_id,
2432+
model_id if not args.push_to_hub else repo_id,
24312433
images=images,
24322434
base_model=args.pretrained_model_name_or_path,
24332435
train_text_encoder=args.train_text_encoder,

0 commit comments

Comments
 (0)