MCPcopy Create free account

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

Functions381 in github.com/Kwai-Kolors/Kolors

Method__init__
Init. Args: features (int): number of features
controlnet/annotator/midas/midas/blocks.py:295
Method__init__
Init. Args: width (int): desired output width height (int): desired output height resize_target (bool, op
controlnet/annotator/midas/midas/transforms.py:52
Method__init__
(self, mean, std)
controlnet/annotator/midas/midas/transforms.py:201
Method__init__
(self)
controlnet/annotator/midas/midas/transforms.py:215
Method__init__
Init. Args: path (str, optional): Path to saved model. Defaults to None. features (int, optional): Number of features
controlnet/annotator/midas/midas/midas_net.py:16
Method__init__
(self, path=None, non_negative=True, **kwargs)
controlnet/annotator/midas/midas/dpt_depth.py:89
Method__init__
( self, vae: AutoencoderKL, text_encoder: ChatGLMModel, tokenizer: ChatGLMToke
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:120
Method__init__
( self, vae: AutoencoderKL, text_encoder: CLIPTextModel, tokenizer: CLIPTokeni
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:405
Method__init__
( self, vae: AutoencoderKL, text_encoder: CLIPTextModel, tokenizer: CLIPTokeni
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:151
Method__init__
( self, vae: AutoencoderKL, text_encoder: ChatGLMModel, tokenizer: ChatGLMToke
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256.py:117
Method__init__
( self, vae: AutoencoderKL, text_encoder: ChatGLMModel, tokenizer: ChatGLMToke
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:128
Method__init__
( self, conditioning_embedding_channels: int, conditioning_channels: int = 3,
kolors/models/controlnet.py:88
Method__init__
( self, sample_size: Optional[int] = None, in_channels: int = 4, out_channels:
kolors/models/unet_2d_condition.py:179
Method__init__
(self, config: ChatGLMConfig)
kolors/models/modeling_chatglm.py:73
Method__init__
(self, dim, original_impl=False, device=None, dtype=None)
kolors/models/modeling_chatglm.py:127
Method__init__
(self, normalized_shape, eps=1e-5, device=None, dtype=None, **kwargs)
kolors/models/modeling_chatglm.py:187
Method__init__
(self, config: ChatGLMConfig, layer_number)
kolors/models/modeling_chatglm.py:201
Method__init__
(self, config: ChatGLMConfig, layer_number, device=None)
kolors/models/modeling_chatglm.py:325
Method__init__
(self, config: ChatGLMConfig, layer_number, device=None)
kolors/models/modeling_chatglm.py:517
Method__init__
(self, config: ChatGLMConfig, device=None)
kolors/models/modeling_chatglm.py:587
Method__init__
(self, config: ChatGLMConfig, device=None)
kolors/models/modeling_chatglm.py:713
Method__init__
(self, config: ChatGLMConfig, device=None, empty_init=True)
kolors/models/modeling_chatglm.py:739
Method__init__
(self, config: ChatGLMConfig, empty_init=True, device=None)
kolors/models/modeling_chatglm.py:857
Method__init__
(self, config: ChatGLMConfig, empty_init=True, device=None)
kolors/models/modeling_chatglm.py:1216
Method__init__
( self, num_layers=28, padded_vocab_size=65024, hidden_size=4096, ffn_
kolors/models/configuration_chatglm.py:6
Method__init__
(self, vocab_file, padding_side="left", clean_up_tokenization_spaces=False, encode_special_tokens=False,
kolors/models/tokenization_chatglm.py:96
Method__init__
(self, hidden_size, cross_attention_dim=None, scale=1.0, num_tokens=4)
kolors/models/ipa_faceid_plus/attention_processor.py:107
Method__init__
(self, *, dim, dim_head=64, heads=8)
kolors/models/ipa_faceid_plus/ipa_faceid_plus.py:25
Method__init__
( self, *, dim=768, depth=4, dim_head=64, heads=16, em
kolors/models/ipa_faceid_plus/ipa_faceid_plus.py:71
Method__len__
(self)
dreambooth/train_dreambooth_lora.py:540
Method__len__
(self)
dreambooth/train_dreambooth_lora.py:662
Method_allocate_memory
(self, inference_max_sequence_len, batch_size, device=None, dtype=None)
kolors/models/modeling_chatglm.py:354
Method_convert_token_to_id
Converts a token (str) in an id using the vocab.
kolors/models/tokenization_chatglm.py:151
Method_execution_device
r""" Returns the device on which the pipeline's models will be executed. After calling `pipeline.enable_sequential_cpu_offload()` the
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:250
Method_execution_device
r""" Returns the device on which the pipeline's models will be executed. After calling `pipeline.enable_sequential_cpu_offload()` the
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256.py:232
Method_execution_device
r""" Returns the device on which the pipeline's models will be executed. After calling `pipeline.enable_sequential_cpu_offload()` the
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:247
Method_init_weights
Initialize the weights.
kolors/models/modeling_chatglm.py:678
Function_make_pretrained_deitb16_384
(pretrained, use_readout="ignore", hooks=None)
controlnet/annotator/midas/midas/vit.py:319
Function_make_pretrained_deitb16_distil_384
(pretrained, use_readout="ignore", hooks=None)
controlnet/annotator/midas/midas/vit.py:328
Method_pad
Pad encoded inputs (on left/right and up to predefined length or max length in the batch) Args: encoded_inputs:
kolors/models/tokenization_chatglm.py:239
Method_reorder_cache
This function is used to re-order the `past_key_values` cache if [`~PreTrainedModel.beam_search`] or [`~PreTrainedModel.beam_sample`]
kolors/models/modeling_chatglm.py:986
Function_resize_pos_embed
(self, posemb, gs_h, gs_w)
controlnet/annotator/midas/midas/vit.py:100
Method_set_gradient_checkpointing
(self, module, value: bool = False)
kolors/models/controlnet.py:674
Method_set_gradient_checkpointing
(self, module, value=False)
kolors/models/unet_2d_condition.py:843
Method_set_gradient_checkpointing
(self, module, value=False)
kolors/models/modeling_chatglm.py:705
Method_tokenize
(self, text, **kwargs)
kolors/models/tokenization_chatglm.py:148
Functionapply_min_size
Rezise the sample to ensure the given size. Keeps aspect ratio. Args: sample (dict): sample size (tuple): image size Returns
controlnet/annotator/midas/midas/transforms.py:6
Methodattn_processors
r""" Returns: `dict` of attention processors: A dictionary containing all attention processors used in the model with
kolors/models/controlnet.py:534
Methodattn_processors
r""" Returns: `dict` of attention processors: A dictionary containing all attention processors used in the model with
kolors/models/unet_2d_condition.py:706
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
kolors/models/tokenization_chatglm.py:214
Methodbuild_layer
(layer_number)
kolors/models/modeling_chatglm.py:597
Methodchat
(self, tokenizer, query: str, history: List[Tuple[str, str]] = None, role: str = "user", max_leng
kolors/models/modeling_chatglm.py:1026
Methodclip_skip
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:1108
Methodclip_skip
(self)
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:853
Methodconvert_tokens_to_string
(self, tokens: List[str])
kolors/models/tokenization_chatglm.py:159
Methodcross_attention_kwargs
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:1119
Methodcross_attention_kwargs
(self)
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:864
Functiondefault_init
(cls, *args, **kwargs)
kolors/models/modeling_chatglm.py:54
Methoddenoising_end
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:1123
Methoddenoising_start
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:1127
Methoddenoising_value_valid
(dnv)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:1456
Methoddisable_freeu
Disables the FreeU mechanism.
kolors/models/unet_2d_condition.py:871
Methoddisable_vae_slicing
r""" Disable sliced VAE decoding. If `enable_vae_slicing` was previously invoked, this method will go back to computing decoding in on
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:171
Methoddisable_vae_slicing
r""" Disable sliced VAE decoding. If `enable_vae_slicing` was previously invoked, this method will go back to computing decoding in on
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256.py:153
Methoddisable_vae_slicing
r""" Disable sliced VAE decoding. If `enable_vae_slicing` was previously invoked, this method will go back to computing decoding in on
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:168
Methoddisable_vae_tiling
r""" Disable tiled VAE decoding. If `enable_vae_tiling` was previously invoked, this method will go back to computing decoding in one
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:189
Methoddisable_vae_tiling
r""" Disable tiled VAE decoding. If `enable_vae_tiling` was previously invoked, this method will go back to computing decoding in one
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256.py:171
Methoddisable_vae_tiling
r""" Disable tiled VAE decoding. If `enable_vae_tiling` was previously invoked, this method will go back to computing decoding in one
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:186
Functiondisabled_train
Overwrite model.train with this function to make sure train/eval mode does not change anymore.
controlnet/annotator/midas/api.py:26
Methoddo_classifier_free_guidance
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:1115
Methoddo_classifier_free_guidance
(self)
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:860
Functiondraw_bodypose
(canvas, candidate, subset)
controlnet/annotator/dwpose/util.py:68
Functiondraw_facepose
(canvas, all_lmks)
controlnet/annotator/dwpose/util.py:140
Functiondraw_handpose
(canvas, all_hand_peaks)
controlnet/annotator/dwpose/util.py:112
Methodenable_freeu
r"""Enables the FreeU mechanism from https://arxiv.org/abs/2309.11497. The suffixes after the scaling factors represent the stage blocks wher
kolors/models/unet_2d_condition.py:847
Methodenable_model_cpu_offload
r""" Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared to `enable_sequenti
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:218
Methodenable_model_cpu_offload
r""" Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared to `enable_sequenti
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:215
Methodenable_sequential_cpu_offload
r""" Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet, text_encoder, vae and safety
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:196
Methodenable_sequential_cpu_offload
r""" Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet, text_encoder, vae and safety
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256.py:178
Methodenable_sequential_cpu_offload
r""" Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet, text_encoder, vae and safety
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:193
Methodenable_vae_slicing
r""" Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to compute decoding in se
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:161
Methodenable_vae_slicing
r""" Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to compute decoding in se
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256.py:143
Methodenable_vae_slicing
r""" Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to compute decoding in se
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:158
Methodenable_vae_tiling
r""" Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and e
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:179
Methodenable_vae_tiling
r""" Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and e
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256.py:161
Methodenable_vae_tiling
r""" Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and e
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:176
Methodeos_token
(self)
kolors/models/tokenization_chatglm.py:131
Methodeos_token_id
(self)
kolors/models/tokenization_chatglm.py:135
FunctionfaceDetect
(candidate, subset, oriImg)
controlnet/annotator/dwpose/util.py:221
Methodfn_recursive_add_processors
(name: str, module: torch.nn.Module, processors: Dict[str, AttentionProcessor])
kolors/models/controlnet.py:543
Methodfn_recursive_add_processors
(name: str, module: torch.nn.Module, processors: Dict[str, AttentionProcessor])
kolors/models/unet_2d_condition.py:715
Methodfn_recursive_attn_processor
(name: str, module: torch.nn.Module, processor)
kolors/models/controlnet.py:579
Methodfn_recursive_attn_processor
(name: str, module: torch.nn.Module, processor)
kolors/models/unet_2d_condition.py:750
Methodfn_recursive_retrieve_sliceable_dims
(module: torch.nn.Module)
kolors/models/controlnet.py:625
Methodfn_recursive_retrieve_sliceable_dims
(module: torch.nn.Module)
kolors/models/unet_2d_condition.py:794
Methodfn_recursive_set_attention_slice
(module: torch.nn.Module, slice_size: List[int])
kolors/models/controlnet.py:663
Methodfn_recursive_set_attention_slice
(module: torch.nn.Module, slice_size: List[int])
kolors/models/unet_2d_condition.py:832
Methodforward
(self, x)
controlnet/annotator/midas/api.py:165
Methodforward
(self, x)
controlnet/annotator/midas/midas/vit.py:14
Methodforward
(self, x)
controlnet/annotator/midas/midas/vit.py:23
← previousnext →201–300 of 381, ranked by callers