Fix issue with kohya locon not training the convolution layers
This commit is contained in:
parent
1e6f2b2d4e
commit
91e19ca9d9
@ -189,7 +189,11 @@ This will store your a backup file with your current locally installed pip packa
|
|||||||
|
|
||||||
## Change History
|
## Change History
|
||||||
|
|
||||||
* 2023.03/12 (v21.2.3):
|
* 2023/03/12 (v21.2.4):
|
||||||
|
- Fix issue with kohya locon not training the convolution layers
|
||||||
|
- Update LyCORIS module version
|
||||||
|
- Update LyCORYS locon extract tool
|
||||||
|
* 2023/03/12 (v21.2.3):
|
||||||
- Add validation that all requirements are met before starting the GUI.
|
- Add validation that all requirements are met before starting the GUI.
|
||||||
* 2023/03/11 (v21.2.2):
|
* 2023/03/11 (v21.2.2):
|
||||||
- Add support for LoRA LoHa type. See https://github.com/KohakuBlueleaf/LyCORIS for more details.
|
- Add support for LoRA LoHa type. See https://github.com/KohakuBlueleaf/LyCORIS for more details.
|
||||||
|
@ -507,7 +507,7 @@ def train_model(
|
|||||||
if LoRA_type == 'Kohya LoCon':
|
if LoRA_type == 'Kohya LoCon':
|
||||||
run_cmd += f' --network_module=networks.lora'
|
run_cmd += f' --network_module=networks.lora'
|
||||||
run_cmd += (
|
run_cmd += (
|
||||||
f' --network_args "conv_lora_dim={conv_dim}" "conv_alpha={conv_alpha}"'
|
f' --network_args "conv_dim={conv_dim}" "conv_alpha={conv_alpha}"'
|
||||||
)
|
)
|
||||||
if LoRA_type == 'Standard':
|
if LoRA_type == 'Standard':
|
||||||
run_cmd += f' --network_module=networks.lora'
|
run_cmd += f' --network_module=networks.lora'
|
||||||
|
@ -25,6 +25,6 @@ timm==0.6.12
|
|||||||
huggingface-hub==0.12.0
|
huggingface-hub==0.12.0
|
||||||
tensorflow==2.10.1
|
tensorflow==2.10.1
|
||||||
# For locon support
|
# For locon support
|
||||||
lycoris_lora==0.0.9
|
lycoris_lora==0.1.2
|
||||||
# for kohya_ss library
|
# for kohya_ss library
|
||||||
.
|
.
|
@ -69,6 +69,18 @@ def get_args():
|
|||||||
"--conv_quantile", help="singular value quantile for conv layer quantile mode",
|
"--conv_quantile", help="singular value quantile for conv layer quantile mode",
|
||||||
default=1., type=float
|
default=1., type=float
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--use_sparse_bias", help="enable sparse bias",
|
||||||
|
default=False, action="store_true"
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--sparsity", help="sparsity for sparse bias",
|
||||||
|
default=0.98, type=float
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--disable_cp", help="don't use cp decomposition",
|
||||||
|
default=False, action="store_true"
|
||||||
|
)
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
ARGS = get_args()
|
ARGS = get_args()
|
||||||
|
|
||||||
@ -102,7 +114,9 @@ def main():
|
|||||||
base, db,
|
base, db,
|
||||||
args.mode,
|
args.mode,
|
||||||
linear_mode_param, conv_mode_param,
|
linear_mode_param, conv_mode_param,
|
||||||
args.device
|
args.device,
|
||||||
|
args.use_sparse_bias, args.sparsity,
|
||||||
|
# not args.disable_small_conv
|
||||||
)
|
)
|
||||||
|
|
||||||
if args.safetensors:
|
if args.safetensors:
|
||||||
|
Loading…
Reference in New Issue
Block a user