MCPcopy Create free account

hub / github.com/KohakuBlueleaf/HyperKohaku / functions

Functions78 in github.com/KohakuBlueleaf/HyperKohaku

↓ 4 callersMethodenable_gradient_checkpointing
(self)
modules/hypernet.py:202
↓ 3 callersMethod__init__
(self, dim_in, dim_out)
modules/attention.py:17
↓ 3 callersMethod__init__
( self, img_encoder_model_name: str = "vit_base_patch16_224", ref_img_size: Tuple[int
modules/hypernet.py:174
↓ 3 callersFunctioncompute_text_embeddings
(prompt)
train_preoptimized_liloras.py:781
↓ 3 callersFunctiondefault
(val, d)
modules/utils/__init__.py:14
↓ 3 callersMethodset_lilora
(self, liloras)
modules/hypernet.py:208
↓ 3 callersMethodupdate_weight
weight: [b, up_dim+down_dim] or [up_dim+down_dim]
modules/lightlora.py:61
↓ 2 callersMethod__init__
( self, in_features, out_features, down_dim=100, up_dim=50,
modules/lightlora.py:17
↓ 2 callersFunction_get_sinusoid_encoding_table
Sinusoid position encoding table
modules/hypernet.py:17
↓ 2 callersFunctioncompute_text_embeddings
(prompt)
train_hyperdreambooth.py:885
↓ 2 callersFunctionencode_prompt
(text_encoder, input_ids, attention_mask, text_encoder_use_attention_mask=None)
train_preoptimized_liloras.py:577
↓ 2 callersFunctionencode_prompt
(text_encoder, input_ids, attention_mask, text_encoder_use_attention_mask=None)
train_hyperdreambooth.py:592
↓ 2 callersMethodgen_weight
(self, identities: torch.Tensor)
modules/hypernet.py:284
↓ 2 callersMethodset_device
(self, device)
modules/hypernet.py:262
↓ 2 callersFunctiontokenize_prompt
(tokenizer, prompt, tokenizer_max_length=None)
train_preoptimized_liloras.py:560
↓ 2 callersFunctiontokenize_prompt
(tokenizer, prompt, tokenizer_max_length=None)
train_hyperdreambooth.py:575
↓ 2 callersMethodtrain_params
(self)
modules/hypernet.py:205
↓ 1 callersFunctioncollate_fn
(examples)
train_preoptimized_liloras.py:517
↓ 1 callersFunctioncollate_fn
(examples)
train_hyperdreambooth.py:532
↓ 1 callersMethoddecode_weight
(self, img_features, iters=None, weight=None)
modules/hypernet.py:147
↓ 1 callersMethodencode_features
(self, ref_img)
modules/hypernet.py:133
↓ 1 callersMethodgen_weight
(self, ref_img, iters, weight, ensure_grad = 0)
modules/hypernet.py:217
↓ 1 callersFunctionget_position_angle_vec
(position)
modules/hypernet.py:19
↓ 1 callersFunctionimport_model_class_from_model_name_or_path
(pretrained_model_name_or_path: str, revision: str)
train_preoptimized_liloras.py:119
↓ 1 callersFunctionimport_model_class_from_model_name_or_path
(pretrained_model_name_or_path: str, revision: str)
train_hyperdreambooth.py:121
↓ 1 callersMethodinit_weights
(self, add_constant: bool = False)
modules/hypernet.py:66
↓ 1 callersFunctionmain
(args)
train_preoptimized_liloras.py:594
↓ 1 callersFunctionmain
(args)
hypernetwork_gen_weight.py:134
↓ 1 callersFunctionmain
(args)
train_hyperdreambooth.py:609
↓ 1 callersMethodmake_weight
(self)
modules/lightlora.py:46
↓ 1 callersFunctionparse_args
(input_args=None)
train_preoptimized_liloras.py:143
↓ 1 callersFunctionparse_args
(input_args=None)
hypernetwork_gen_weight.py:50
↓ 1 callersFunctionparse_args
(input_args=None)
train_hyperdreambooth.py:145
↓ 1 callersMethodset_lilora
(self, liloras, identities = 1)
modules/hypernet.py:265
↓ 1 callersFunctionunet_lilora_attn_processors_state_dict
r""" Returns: a state dict containing just the attention processor parameters.
hypernetwork_gen_weight.py:118
Method__call__
( self, attn: Attention, hidden_states, encoder_hidden_states=None, attention_mask=None, scale=1.0, te
modules/lightlora.py:125
Method__call__
( self, attn: Attention, hidden_states, encoder_hidden_states=None, attention_mask=None, scale=1.0, te
modules/lightlora.py:199
Method__getitem__
(self, index)
train_preoptimized_liloras.py:494
Method__getitem__
(self, index)
train_preoptimized_liloras.py:553
Method__getitem__
(self, index)
train_hyperdreambooth.py:509
Method__getitem__
(self, index)
train_hyperdreambooth.py:568
Method__init__
( self, instance_data_root, instance_prompt, tokenizer, size=512,
train_preoptimized_liloras.py:451
Method__init__
(self, prompt, num_samples)
train_preoptimized_liloras.py:546
Method__init__
( self, instance_data_root, instance_prompt, tokenizer, size=512,
train_hyperdreambooth.py:466
Method__init__
(self, prompt, num_samples)
train_hyperdreambooth.py:561
Method__init__
(self, hidden_size, cross_attention_dim=None, down_dim=100, up_dim=50, rank=4, network_alpha=None)
modules/lightlora.py:109
Method__init__
(self, hidden_size, cross_attention_dim=None, down_dim=100, up_dim=50, rank=4, attention_op = None, network_al
modules/lightlora.py:182
Method__init__
(self, dim, dim_out=None, mult=4, glu=False)
modules/attention.py:27
Method__init__
( self, in_ch, context_ch=None, heads=8, head_ch=64, self_cros
modules/attention.py:88
Method__init__
( self, dim, n_heads, d_head, context_dim=None, gated_ff=True,
modules/attention.py:191
Method__init__
( self, weight_dim: int = 150, weight_num: int = 168, decoder_blocks: int =
modules/hypernet.py:32
Method__init__
( self, encoder_model_name: str = "vit_base_patch16_224", train_encoder: bool = False
modules/hypernet.py:93
Method__init__
( self, rank: int = 1, down_dim: int = 100, up_dim: int = 50, )
modules/hypernet.py:239
Method__len__
(self)
train_preoptimized_liloras.py:491
Method__len__
(self)
train_preoptimized_liloras.py:550
Method__len__
(self)
train_hyperdreambooth.py:506
Method__len__
(self)
train_hyperdreambooth.py:565
Methodbasic_init
(module)
modules/hypernet.py:67
Methodenable_gradient_checkpointing
(self)
modules/hypernet.py:256
Methodforward
(self, hidden_states)
modules/lightlora.py:89
Methodforward
(self, x)
modules/attention.py:21
Methodforward
(self, x)
modules/attention.py:43
Methodforward
(self, x:torch.Tensor, context=None, mask=None)
modules/attention.py:146
Methodforward
(self, x, context=None)
modules/attention.py:224
Methodforward
(self, weight, features)
modules/hypernet.py:83
Methodforward
(self, ref_img, iters=None, weight=None, ensure_grad=0)
modules/hypernet.py:160
Methodforward
(self, ref_img: torch.Tensor, iters: int = None, weight: torch.Tensor = None)
modules/hypernet.py:222
Methodforward
(self, ref_img: torch.Tensor)
modules/hypernet.py:289
Methodlayers
(self)
modules/lightlora.py:122
Methodlayers
(self)
modules/lightlora.py:196
Functionload_model_hook
(models, input_dir)
train_preoptimized_liloras.py:881
Functionload_model_hook
(models, input_dir)
train_hyperdreambooth.py:819
Functionsave_model_card
( repo_id: str, images=None, base_model=str, train_text_encoder=False, prompt=str, rep
train_preoptimized_liloras.py:78
Functionsave_model_card
( repo_id: str, images=None, base_model=str, train_text_encoder=False, prompt=str, rep
train_hyperdreambooth.py:80
Functionsave_model_hook
(models, weights, output_dir)
train_preoptimized_liloras.py:854
Functionsave_model_hook
(models, weights, output_dir)
train_hyperdreambooth.py:792
Methodtrain_params
(self)
modules/hypernet.py:259
Functionvanilla_attention
(q, k, v, mask, scale=None)
modules/attention.py:70