MCPcopy Create free account

hub / github.com/KohakuBlueleaf/LyCORIS / functions

Functions372 in github.com/KohakuBlueleaf/LyCORIS

Method__init__
f(x) = WX + WAX + BX, where A and B are low-rank matrices bypass_forward(x) = W(X+A(X)) + B(X) bypass_forward_diff(x) = W(A(X
lycoris/modules/glora.py:29
Method__init__
(self, dim)
test/wrapper.py:107
Method__init__
(self, dim)
test/wrapper.py:121
Method__init__
(self, name, *layers)
test/wrapper.py:135
Method__init__
(self, dim)
test/wrapper.py:147
Method__init__
(self)
test/restore.py:13
Method__init__
(self)
test/compile.py:15
Methodalgo_check
(cls, state_dict, lora_name)
lycoris/modules/boft.py:102
Methodalgo_check
(cls, state_dict, lora_name)
lycoris/modules/diag_oft.py:89
Functionapply_dora_scale
(org_weight, rebuild, dora_scale, scale)
lycoris/functional/general.py:95
Methodapply_max_norm
(self, max_norm, device=None)
lycoris/modules/boft.py:190
Methodapply_max_norm
(self, max_norm, device=None)
lycoris/modules/loha.py:282
Methodapply_max_norm
(self, max_norm, device=None)
lycoris/modules/locon.py:274
Methodapply_max_norm
(self, max_norm, device=None)
lycoris/modules/base.py:412
Methodapply_max_norm
(self, max_norm, device=None)
lycoris/modules/diag_oft.py:161
Methodapply_max_norm
Apply max norm regularization to weights.
lycoris/modules/tlora.py:549
Methodapply_max_norm_regularization
(self, max_norm_value, device)
lycoris/wrapper.py:611
Methodapply_max_norm_regularization
(self, max_norm_value, device)
lycoris/kohya.py:707
Methodapply_to
Register to modules to the subclass so that torch sees them.
lycoris/wrapper.py:579
Methodapply_to
(self, text_encoder, unet, apply_text_encoder=None, apply_unet=None)
lycoris/kohya.py:659
Methodapply_to
(self, **kwargs)
lycoris/modules/base.py:299
Methodapply_to
(self, **kwargs)
lycoris/modules/full.py:108
Methodassemble_params
(loras, lr, ratio)
lycoris/kohya.py:744
Methodbackward
(ctx, grad_out)
lycoris/functional/loha.py:44
Methodbypass_forward
(self, x, scale=1)
lycoris/modules/base.py:418
Functionbypass_forward_diff
### boft_bypass_forward_diff Args: x (torch.Tensor): the input tensor for original model org_out (torch.Tensor): the output tenso
lycoris/functional/boft.py:74
Functionbypass_forward_diff
### bypass_forward_diff Args: weights (tuple[torch.Tensor]): (w1, w1a, w1b, w2, w2a, w2b, t) gamma (float, optional): scale facto
lycoris/functional/lokr.py:154
Functionbypass_forward_diff
### bypass_forward_diff Args: x (torch.Tensor): input tensor weights (tuple[torch.Tensor]): (w1d, w2d, w1u, w2u[, t1, t2])
lycoris/functional/loha.py:150
Functionbypass_forward_diff
### bypass_forward_diff Args: x (torch.Tensor): input tensor weights (tuple[torch.Tensor]): (down, up[, mid]) gamma (floa
lycoris/functional/locon.py:64
Functionbypass_forward_diff
### bypass_forward_diff Args: x (torch.Tensor): the input tensor for original model org_out (torch.Tensor): the output tensor fro
lycoris/functional/diag_oft.py:79
Methodbypass_forward_diff
(self, x, scale=1)
lycoris/modules/boft.py:238
Methodbypass_forward_diff
(self, x, scale=1)
lycoris/modules/base.py:415
Methodbypass_forward_diff
(self, x, scale=1)
lycoris/modules/diag_oft.py:200
Methodbypass_forward_diff
(self, x, scale=1)
lycoris/modules/glora.py:240
Methodcheck_dims
(lora, factor)
test/wrapper.py:437
Functionclear_timestep_mask
Clear the timestep mask after forward pass.
lycoris/modules/tlora.py:53
Functioncompute_timestep_mask
Compute a binary rank mask based on timestep. At high noise (high timestep): fewer ranks active (structure-level adaptation) At low nois
lycoris/modules/tlora.py:58
Methodconvert_to_webui
( self, sd_unet, sd_te, )
tools/batch_hcp_convert.py:354
Methodcreate_modules
( prefix, root_module: torch.nn.Module, target_replace_modules,
lycoris/wrapper.py:403
Methodcreate_modules
( prefix, root_module: torch.nn.Module, target_replace_modules,
lycoris/kohya.py:468
Methodcreate_modules_
( prefix: str, root_module: torch.nn.Module, algo, current_lor
lycoris/wrapper.py:351
Methodcreate_modules_
( prefix: str, root_module: torch.nn.Module, algo, configs={},
lycoris/kohya.py:432
Methodcreate_single_module
( lora_name: str, module: torch.nn.Module, algo_name, dim=None
lycoris/wrapper.py:296
Methodcreate_single_module
( lora_name: str, module: torch.nn.Module, algo_name, dim=None
lycoris/kohya.py:377
Methodcustom_state_dict
(self)
lycoris/modules/dylora.py:84
Methodcustom_state_dict
(self)
lycoris/modules/lokr.py:422
Methodcustom_state_dict
(self)
lycoris/modules/loha.py:267
Methodcustom_state_dict
(self)
lycoris/modules/locon.py:262
Methodcustom_state_dict
Return state dict for saving.
lycoris/modules/tlora.py:364
Methodcustom_state_dict
(self)
lycoris/modules/full.py:128
Methodcustom_state_dict
(self)
lycoris/modules/glora.py:156
Functiondefault
(val, d)
lycoris/utils/__init__.py:48
Functiondescribe_algo
(name: str)
lycoris/config_sdk.py:311
Functiondiff_weight
### boft_diff_weight Args: org_weight (torch.Tensor): the weight tensor of original model weights (tuple[torch.Tensor]): (oft_blo
lycoris/functional/boft.py:37
Functiondiff_weight
### diff_weight Args: weights (tuple[torch.Tensor]): (w1, w1a, w1b, w2, w2a, w2b, t) gamma (float, optional): scale factor, norma
lycoris/functional/lokr.py:124
Functiondiff_weight
### diff_weight Get ΔW = BA, where BA is low rank decomposition Args: weights (tuple[torch.Tensor]): (down, up[, mid]) gamma
lycoris/functional/locon.py:37
Functiondiff_weight
### diff_weight Args: org_weight (torch.Tensor): the weight tensor of original model weights (tuple[torch.Tensor]): (oft_blocks[,
lycoris/functional/diag_oft.py:48
Methoddtype
(self)
lycoris/modules/base.py:277
Methodenable_gradient_checkpointing
(self)
lycoris/wrapper.py:626
Methodenable_gradient_checkpointing
(self)
lycoris/kohya.py:803
Methodenumerate_params
(loras)
lycoris/wrapper.py:636
Functionerror_once
(msg)
lycoris/logging.py:51
Methodformat
(self, record)
lycoris/logging.py:17
Methodformat
(self, record)
lycoris/utils/logger.py:16
Methodforward
(self, x)
example/standalone_example.py:25
Methodforward
(self, x: torch.Tensor)
example/stacked_wrapper_demo.py:25
Methodforward
(self, x, *args, **kwargs)
lycoris/modules/ia3.py:129
Methodforward
(self, x, *args, **kwargs)
lycoris/modules/boft.py:244
Methodforward
(self, x, *args, **kwargs)
lycoris/modules/dylora.py:143
Methodforward
(self, x: torch.Tensor, *args, **kwargs)
lycoris/modules/lokr.py:543
Methodforward
(self, x: torch.Tensor, *args, **kwargs)
lycoris/modules/loha.py:301
Methodforward
(self, x, *args, **kwargs)
lycoris/modules/locon.py:309
Methodforward
(self, *args, **kwargs)
lycoris/modules/base.py:426
Methodforward
(self, x: torch.Tensor, *args, **kwargs)
lycoris/modules/diag_oft.py:206
Methodforward
Forward pass with timestep-dependent rank masking.
lycoris/modules/tlora.py:521
Methodforward
(self, x, *args, **kwargs)
lycoris/modules/norms.py:125
Methodforward
(self, x: torch.Tensor, *args, **kwargs)
lycoris/modules/full.py:200
Methodforward
(self, x, *args, **kwargs)
lycoris/modules/glora.py:246
Methodforward
(ctx, w1d, w1u, w2d, w2u, scale=torch.tensor(1))
lycoris/functional/loha.py:12
Methodforward
(ctx, t1, w1d, w1u, t2, w2d, w2u, scale=torch.tensor(1))
lycoris/functional/loha.py:35
Methodforward
(self, x)
test/wrapper.py:47
Methodforward
(self, x)
test/wrapper.py:113
Methodforward
(self, x)
test/wrapper.py:127
Methodforward
(self, x)
test/wrapper.py:140
Methodforward
(self, x)
test/wrapper.py:162
Methodforward
(self, x)
test/restore.py:18
Methodforward
(self, x)
test/compile.py:20
Methodget_diff_weight
(self, multiplier=1, shape=None, device=None)
lycoris/modules/ia3.py:104
Methodget_diff_weight
(self, multiplier=1, shape=None, device=None)
lycoris/modules/boft.py:177
Methodget_diff_weight
(self, multiplier=1, shape=None, device=None)
lycoris/modules/diag_oft.py:148
Methodget_merged_weight
(self, multiplier=1, shape=None, device=None)
lycoris/modules/boft.py:183
Methodget_merged_weight
(self, multiplier=1, shape=None, device=None)
lycoris/modules/lokr.py:390
Methodget_merged_weight
(self, multiplier=1, shape=None, device=None)
lycoris/modules/loha.py:235
Methodget_merged_weight
(self, multiplier=1, shape=None, device=None)
lycoris/modules/locon.py:230
Methodget_merged_weight
(self, multiplier=1, shape=None, device=None)
lycoris/modules/diag_oft.py:154
Methodget_merged_weight
Get original weight + LoRA delta.
lycoris/modules/tlora.py:425
Methodget_merged_weight
(self, multiplier=1, shape=None, device=None)
lycoris/modules/norms.py:112
Methodget_merged_weight
(self, multiplier=1, shape=None, device=None)
lycoris/modules/full.py:192
Methodget_merged_weight
(self, multiplier=1, shape=None, device=None)
lycoris/modules/glora.py:206
Methodget_trainable_params
(self, *args)
lycoris/wrapper.py:657
← previousnext →201–300 of 372, ranked by callers