mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
remove unnecessary newline
This commit is contained in:
@@ -94,7 +94,7 @@ def split(args):
|
|||||||
filename, ext = os.path.splitext(args.save_to)
|
filename, ext = os.path.splitext(args.save_to)
|
||||||
model_file_name = filename + f"-{new_rank:04d}{ext}"
|
model_file_name = filename + f"-{new_rank:04d}{ext}"
|
||||||
|
|
||||||
print(f"\nsaving model to: {model_file_name}")
|
print(f"saving model to: {model_file_name}")
|
||||||
save_to_file(model_file_name, state_dict, new_metadata)
|
save_to_file(model_file_name, state_dict, new_metadata)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -193,12 +193,12 @@ def merge(args):
|
|||||||
|
|
||||||
merge_to_sd_model(text_encoder, unet, args.models, args.ratios, merge_dtype)
|
merge_to_sd_model(text_encoder, unet, args.models, args.ratios, merge_dtype)
|
||||||
|
|
||||||
print(f"\nsaving SD model to: {args.save_to}")
|
print(f"saving SD model to: {args.save_to}")
|
||||||
model_util.save_stable_diffusion_checkpoint(args.v2, args.save_to, text_encoder, unet, args.sd_model, 0, 0, save_dtype, vae)
|
model_util.save_stable_diffusion_checkpoint(args.v2, args.save_to, text_encoder, unet, args.sd_model, 0, 0, save_dtype, vae)
|
||||||
else:
|
else:
|
||||||
state_dict = merge_lora_models(args.models, args.ratios, merge_dtype)
|
state_dict = merge_lora_models(args.models, args.ratios, merge_dtype)
|
||||||
|
|
||||||
print(f"\nsaving model to: {args.save_to}")
|
print(f"saving model to: {args.save_to}")
|
||||||
save_to_file(args.save_to, state_dict, state_dict, save_dtype)
|
save_to_file(args.save_to, state_dict, state_dict, save_dtype)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ def resize(args):
|
|||||||
metadata["sshs_model_hash"] = model_hash
|
metadata["sshs_model_hash"] = model_hash
|
||||||
metadata["sshs_legacy_hash"] = legacy_hash
|
metadata["sshs_legacy_hash"] = legacy_hash
|
||||||
|
|
||||||
print(f"\nsaving model to: {args.save_to}")
|
print(f"saving model to: {args.save_to}")
|
||||||
save_to_file(args.save_to, state_dict, state_dict, save_dtype, metadata)
|
save_to_file(args.save_to, state_dict, state_dict, save_dtype, metadata)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ def merge(args):
|
|||||||
new_conv_rank = args.new_conv_rank if args.new_conv_rank is not None else args.new_rank
|
new_conv_rank = args.new_conv_rank if args.new_conv_rank is not None else args.new_rank
|
||||||
state_dict = merge_lora_models(args.models, args.ratios, args.new_rank, new_conv_rank, args.device, merge_dtype)
|
state_dict = merge_lora_models(args.models, args.ratios, args.new_rank, new_conv_rank, args.device, merge_dtype)
|
||||||
|
|
||||||
print(f"\nsaving model to: {args.save_to}")
|
print(f"saving model to: {args.save_to}")
|
||||||
save_to_file(args.save_to, state_dict, save_dtype)
|
save_to_file(args.save_to, state_dict, save_dtype)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user