Skip to content

Commit

Permalink
change
Browse files Browse the repository at this point in the history
  • Loading branch information
gesen2egee committed Apr 9, 2024
1 parent 64745f2 commit 53da2c8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 5 additions & 2 deletions lora_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,6 @@ def train_model(

run_cmd += run_cmd_advanced_training(
adaptive_noise_scale=adaptive_noise_scale,
additional_parameters=additional_parameters,
bucket_no_upscale=bucket_no_upscale,
bucket_reso_steps=bucket_reso_steps,
cache_latents=cache_latents,
Expand Down Expand Up @@ -961,7 +960,6 @@ def train_model(
noise_offset=noise_offset,
noise_offset_type=noise_offset_type,
optimizer=optimizer,
optimizer_args=optimizer_args,
output_dir=output_dir,
output_name=output_name,
persistent_data_loader_workers=persistent_data_loader_workers,
Expand Down Expand Up @@ -1006,6 +1004,11 @@ def train_model(
output_dir,
)

run_cmd += run_cmd_advanced_training(
optimizer_args=optimizer_args,
additional_parameters=additional_parameters,
)

if print_only_bool:
log.warning(
"Here is the trainer command as a reference. It will not be executed:\n"
Expand Down
4 changes: 1 addition & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@
# this is for onnx:
# this is for onnx:
# timm==0.6.12ge
accelerate==0.25.0
aiofiles==23.2.1
altair==4.2.2
beartype
bitsandbytes==0.43.0
dadaptation==3.1
diffusers[torch]==0.25.0
easygui==0.98.3
Expand All @@ -41,7 +39,7 @@ huggingface-hub==0.20.1
imagesize==1.4.1
invisible-watermark==0.2.0
lion-pytorch==0.0.6
lycoris_lora==2.3.0.dev5
lycoris_lora==2.3.0.dev4
omegaconf==2.3.0
onnx==1.14.1
onnxruntime-gpu==1.16.0
Expand Down
4 changes: 2 additions & 2 deletions train_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def train(self, args):
for e in emas:
e.to(device=accelerator.device)

if args.optimizer_type.lower().endswith("scheduleFree"):
if args.optimizer_type.lower().endswith("schedulefree"):
network, optimizer, train_dataloader = accelerator.prepare(
network, optimizer, train_dataloader
)
Expand Down Expand Up @@ -1026,7 +1026,7 @@ def remove_model(old_ckpt_name):
accelerator.clip_grad_norm_(params_to_clip, args.max_grad_norm)

optimizer.step()
if not args.optimizer_type.lower().endswith("scheduleFree"):
if not args.optimizer_type.lower().endswith("schedulefree"):
lr_scheduler.step()
optimizer.zero_grad(set_to_none=True)

Expand Down

0 comments on commit 53da2c8

Please sign in to comment.