MCPcopy Create free account

hub / github.com/Kwai-Kolors/Kolors / functions

Functions381 in github.com/Kwai-Kolors/Kolors

Methodforward
(self, x)
controlnet/annotator/midas/midas/vit.py:38
Methodforward
(self, x)
controlnet/annotator/midas/midas/vit.py:51
Methodforward
Forward pass. Args: x (tensor): input data (image) Returns: tensor: depth
controlnet/annotator/midas/midas/midas_net_custom.py:73
Methodforward
Forward pass. Args: x (tensor): input Returns: tensor: interpolated data
controlnet/annotator/midas/midas/blocks.py:138
Methodforward
Forward pass. Args: x (tensor): input Returns: tensor: output
controlnet/annotator/midas/midas/blocks.py:177
Methodforward
Forward pass. Returns: tensor: output
controlnet/annotator/midas/midas/blocks.py:209
Methodforward
Forward pass. Args: x (tensor): input Returns: tensor: output
controlnet/annotator/midas/midas/blocks.py:263
Methodforward
Forward pass. Returns: tensor: output
controlnet/annotator/midas/midas/blocks.py:320
Methodforward
Forward pass. Args: x (tensor): input data (image) Returns: tensor: depth
controlnet/annotator/midas/midas/midas_net.py:49
Methodforward
(self, x)
controlnet/annotator/midas/midas/dpt_depth.py:107
Methodforward
(self, conditioning)
kolors/models/controlnet.py:110
Methodforward
The [`ControlNetModel`] forward method. Args: sample (`torch.Tensor`): The noisy input tensor.
kolors/models/controlnet.py:678
Methodforward
r""" The [`UNet2DConditionModel`] forward method. Args: sample (`torch.Tensor`): The noisy input tensor w
kolors/models/unet_2d_condition.py:1045
Methodforward
(self, prefix: torch.Tensor)
kolors/models/modeling_chatglm.py:89
Methodforward
(self, max_seq_len, offset=0)
kolors/models/modeling_chatglm.py:159
Methodforward
(self, hidden_states: torch.Tensor)
kolors/models/modeling_chatglm.py:192
Methodforward
(self, query_layer, key_layer, value_layer, attention_mask)
kolors/models/modeling_chatglm.py:226
Methodforward
( self, hidden_states, attention_mask, rotary_pos_emb, kv_cache=None, use_cache=True )
kolors/models/modeling_chatglm.py:368
Methodforward
(self, hidden_states)
kolors/models/modeling_chatglm.py:501
Methodforward
( self, hidden_states, attention_mask, rotary_pos_emb, kv_cache=None, use_cache=True, )
kolors/models/modeling_chatglm.py:541
Methodforward
( self, hidden_states, attention_mask, rotary_pos_emb, kv_caches=None, use_cache: Opti
kolors/models/modeling_chatglm.py:613
Methodforward
(self, input_ids)
kolors/models/modeling_chatglm.py:726
Methodforward
( self, input_ids, position_ids: Optional[torch.Tensor] = None,
kolors/models/modeling_chatglm.py:791
Methodforward
( self, input_ids: Optional[torch.Tensor] = None, position_ids: Optional[t
kolors/models/modeling_chatglm.py:925
Methodforward
( self, input_ids: Optional[torch.LongTensor] = None, position_ids: Option
kolors/models/modeling_chatglm.py:1232
Methodforward
Args: x (torch.Tensor): image features shape (b, n1, D) latent (torch.Tensor): latent features
kolors/models/ipa_faceid_plus/ipa_faceid_plus.py:39
Methodforward
(self, latents, x)
kolors/models/ipa_faceid_plus/ipa_faceid_plus.py:98
Methodforward
(self, id_embeds, clip_embeds, shortcut = True, scale = 1.0)
kolors/models/ipa_faceid_plus/ipa_faceid_plus.py:130
Functionforward_flex
(self, x)
controlnet/annotator/midas/midas/vit.py:117
Methodfrom_unet
r""" Instantiate a [`ControlNetModel`] from [`UNet2DConditionModel`]. Parameters: unet (`UNet2DConditionModel`):
kolors/models/controlnet.py:457
Functionfuse_model
(m)
controlnet/annotator/midas/midas/midas_net_custom.py:109
Methodfuse_qkv_projections
Enables fused QKV projections. For self-attention modules, all projection matrices (i.e., query, key, value) are fused. For cross-att
kolors/models/unet_2d_condition.py:879
Methodget_input_embeddings
(self)
kolors/models/modeling_chatglm.py:773
Methodget_vocab
Returns vocab as a dict
kolors/models/tokenization_chatglm.py:142
Methodgetres
(self, oriImg)
controlnet/annotator/dwpose/__init__.py:38
Methodguidance_rescale
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:1104
Methodguidance_scale
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:1100
Methodguidance_scale
(self)
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:849
FunctionhandDetect
(candidate, subset, oriImg)
controlnet/annotator/dwpose/util.py:155
Functionhook
(model, input, output)
controlnet/annotator/midas/midas/vit.py:160
Functionimg2mask
(img, H, W, low=10, high=90)
controlnet/annotator/util.py:115
Functioninfer
(test_image_path, text_prompt)
ipadapter_FaceID/sample_ipadapter_faceid_plus.py:55
Functioninfer
(prompt)
dreambooth/infer_dreambooth.py:13
Functioninfer
( image_path , ip_image_path, prompt, model_type = 'Canny' )
controlnet/sample_controlNet_ipadapter.py:46
Functioninfer
( image_path , prompt, model_type = 'Canny' )
controlnet/sample_controlNet.py:60
Functioninfer
(prompt)
scripts/sample.py:11
Functioninfer
(prompt, use_random_seed, seed, height, width, num_inference_steps, guidance_scale, num_images_per_prompt)
scripts/sampleui.py:49
Functioninfer
( ip_img_path, prompt )
ipadapter/sample_ipadapter_plus.py:20
Functioninfer
(image_path, mask_path, prompt)
inpainting/sample_inpainting.py:18
Methodinterrupt
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:1135
Functionload_midas_transform
(model_type)
controlnet/annotator/midas/api.py:32
Functionload_model_hook
(models, input_dir)
dreambooth/train_dreambooth_lora.py:926
Functionmake_noise_disk
(H, W, C, F)
controlnet/annotator/util.py:92
Functionmin_max_norm
(x)
controlnet/annotator/util.py:103
Functionnms
(x, t, s)
controlnet/annotator/util.py:74
Functionnpmax
(array)
controlnet/annotator/dwpose/util.py:292
Methodnum_timesteps
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:1131
Methodnum_timesteps
(self)
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:868
FunctionpadRightDownCorner
(img, stride, padValue)
controlnet/annotator/dwpose/util.py:38
Methodpad_token
(self)
kolors/models/tokenization_chatglm.py:123
Methodpad_token_id
(self)
kolors/models/tokenization_chatglm.py:127
Functionprepare_mask_and_masked_image
Prepares a pair (image, mask) to be consumed by the Stable Diffusion pipeline. This means that those inputs will be converted to ``torch.Tens
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:135
Functionread_image
Read image and output RGB image (0-1). Args: path (str): path to file Returns: array: RGB image (0-1)
controlnet/annotator/midas/utils.py:97
Functionread_pfm
Read pfm file. Args: path (str): path to file Returns: tuple: (data, scale)
controlnet/annotator/midas/utils.py:9
Functionresize_depth
Resize depth map and bring to CPU (numpy). Args: depth (tensor): depth width (int): image width height (int): image heigh
controlnet/annotator/midas/utils.py:146
Functionresize_image
Resize image and make it fit for network. Args: img (array): image Returns: tensor: data ready for network
controlnet/annotator/midas/utils.py:116
Functionsafe_step
(x, step=2)
controlnet/annotator/util.py:109
Functionsave_model_hook
(models, weights, output_dir)
dreambooth/train_dreambooth_lora.py:906
Functionsave_model_hook_no_text
(models, weights, output_dir)
dreambooth/train_dreambooth_lora.py:917
Methodsave_vocabulary
Save the vocabulary and special tokens file to a directory. Args: save_directory (`str`): The directory
kolors/models/tokenization_chatglm.py:162
Methodset_default_attn_processor
Disables custom attention processors and sets the default attention implementation.
kolors/models/controlnet.py:593
Methodset_default_attn_processor
Disables custom attention processors and sets the default attention implementation.
kolors/models/unet_2d_condition.py:763
Functionsmart_resize
(x, s)
controlnet/annotator/dwpose/util.py:10
Functionsmart_resize_k
(x, fx, fy)
controlnet/annotator/dwpose/util.py:24
Methodstream_chat
(self, tokenizer, query: str, history: List[Tuple[str, str]] = None, role: str = "user", p
kolors/models/modeling_chatglm.py:1048
Methodswiglu
(x)
kolors/models/modeling_chatglm.py:486
Methodtool_call
(**kwargs)
kolors/models/modeling_chatglm.py:1017
Functiontransfer
(model, model_weights)
controlnet/annotator/dwpose/util.py:61
Methodunfuse_qkv_projections
Disables the fused QKV projection if enabled. <Tip warning={true}> This API is 🧪 experimental. </Tip>
kolors/models/unet_2d_condition.py:902
Methodunk_token
(self)
kolors/models/tokenization_chatglm.py:119
Functionwrite_depth
Write depth map to pfm and png file. Args: path (str): filepath without extension depth (array): depth
controlnet/annotator/midas/utils.py:165
← previous301–381 of 381, ranked by callers