MCPcopy Create free account

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

Functions381 in github.com/Kwai-Kolors/Kolors

↓ 1 callersMethodget_position_ids
(self, input_ids, device)
kolors/models/modeling_chatglm.py:700
↓ 1 callersMethodget_prefix_tokens
(self)
kolors/models/tokenization_chatglm.py:190
↓ 1 callersMethodget_prompt
(self, batch_size, device, dtype=torch.half)
kolors/models/modeling_chatglm.py:776
↓ 1 callersFunctionget_simcc_maximum
Get maximum response location and value from simcc representations. Note: instance number: N num_keypoints: K heatmap hei
controlnet/annotator/dwpose/onnxpose.py:288
↓ 1 callersMethodget_size
(self, width, height)
controlnet/annotator/midas/midas/transforms.py:105
↓ 1 callersMethodget_time_embed
( self, sample: torch.Tensor, timestep: Union[torch.Tensor, float, int] )
kolors/models/unet_2d_condition.py:915
↓ 1 callersMethodget_timesteps
(self, num_inference_steps, strength, device, denoising_start=None)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:960
↓ 1 callersMethodget_timesteps
(self, num_inference_steps, strength, device)
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:712
↓ 1 callersFunctionget_warp_matrix
Calculate the affine transformation matrix that can warp the bbox area in the input image to the output size. Args: center (np.ndarra
controlnet/annotator/dwpose/onnxpose.py:201
↓ 1 callersFunctiongradio_interface
()
scripts/sampleui.py:82
↓ 1 callersFunctioninference
Inference RTMPose model. Args: sess (ort.InferenceSession): ONNXRuntime session. img (np.ndarray): Input image in shape. Ret
controlnet/annotator/dwpose/onnxpose.py:52
↓ 1 callersFunctioninference_detector
(session, oriImg)
controlnet/annotator/dwpose/onnxdet.py:98
↓ 1 callersFunctioninference_pose
(session, out_bbox, oriImg)
controlnet/annotator/dwpose/onnxpose.py:353
↓ 1 callersMethodinit_ip_adapter_proj_layer
(self, clip_embeddings_dim, num_tokens)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:597
↓ 1 callersMethodload_ip_adapter_faceid_plus
(self, ip_faceid_model_path, device)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:607
↓ 1 callersFunctionload_model
(model_type)
controlnet/annotator/midas/api.py:77
↓ 1 callersFunctionload_models
()
scripts/sampleui.py:21
↓ 1 callersFunctionmain
(args)
dreambooth/train_dreambooth_lora.py:711
↓ 1 callersFunctionmulticlass_nms
Multiclass NMS implemented in Numpy. Class-aware version.
controlnet/annotator/dwpose/onnxdet.py:35
↓ 1 callersFunctionnms
Single class NMS implemented in Numpy.
controlnet/annotator/dwpose/onnxdet.py:6
↓ 1 callersFunctionparse_args
(input_args=None)
dreambooth/train_dreambooth_lora.py:86
↓ 1 callersFunctionpostprocess
Postprocess for RTMPose model output. Args: outputs (np.ndarray): Output of RTMPose model. model_input_size (tuple): RTMPose mode
controlnet/annotator/dwpose/onnxpose.py:80
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:442
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:696
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:438
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256.py:424
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:512
↓ 1 callersMethodprepare_inputs_for_generation
( self, input_ids: torch.LongTensor, past_key_values: Optional[torch.Tenso
kolors/models/modeling_chatglm.py:899
↓ 1 callersMethodprepare_ip_adapter_image_embeds
( self, ip_adapter_image, ip_adapter_image_embeds, device, num_images_per_prompt, do_classifier_free_g
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:474
↓ 1 callersMethodprepare_ip_adapter_image_embeds
( self, ip_adapter_image, ip_adapter_image_embeds, device, num_images_per_prompt, do_classifier_free_g
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:392
↓ 1 callersMethodprepare_ip_adapter_image_embeds
( self, ip_adapter_image, ip_adapter_image_embeds, device, num_images_per_prompt, do_classifier_free_g
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:465
↓ 1 callersMethodprepare_latents
(self, batch_size, num_channels_latents, height, width, dtype, device, generator, latents=None)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:519
↓ 1 callersMethodprepare_latents
( self, batch_size, num_channels_latents, height, width, dtype
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:817
↓ 1 callersMethodprepare_latents
( self, image, timestep, batch_size, num_images_per_prompt, dtype, device, generator=None, add_noise=T
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:724
↓ 1 callersMethodprepare_latents
(self, batch_size, num_channels_latents, height, width, dtype, device, generator, latents=None)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256.py:501
↓ 1 callersMethodprepare_latents
(self, batch_size, num_channels_latents, height, width, dtype, device, generator, latents=None)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:589
↓ 1 callersMethodprepare_latents_t2i
(self, batch_size, num_channels_latents, height, width, dtype, device, generator, latents=None)
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:794
↓ 1 callersMethodprepare_mask_latents
( self, mask, masked_image, batch_size, height, width, dtype, device, generator, do_classifier_free_gu
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:906
↓ 1 callersFunctionpreprocess
(img, input_size, swap=(2, 0, 1))
controlnet/annotator/dwpose/onnxdet.py:80
↓ 1 callersFunctionpreprocess
Do preprocessing for RTMPose model inference. Args: img (np.ndarray): Input image in shape. input_size (tuple): Input image size
controlnet/annotator/dwpose/onnxpose.py:7
↓ 1 callersFunctionprocess_canny_condition
( image, canny_threods=[100,200] )
controlnet/sample_controlNet_ipadapter.py:24
↓ 1 callersFunctionprocess_canny_condition
( image, canny_threods=[100,200] )
controlnet/sample_controlNet.py:25
↓ 1 callersFunctionprocess_depth_condition_midas
(img, res = 1024)
controlnet/sample_controlNet_ipadapter.py:34
↓ 1 callersFunctionprocess_depth_condition_midas
(img, res = 1024)
controlnet/sample_controlNet.py:35
↓ 1 callersFunctionprocess_dwpose_condition
( image, res=1024 )
controlnet/sample_controlNet.py:48
↓ 1 callersMethodprocess_encoder_hidden_states
( self, encoder_hidden_states: torch.Tensor, added_cond_kwargs: Dict[str, Any] )
kolors/models/unet_2d_condition.py:1009
↓ 1 callersMethodquantize
(self, weight_bit_width: int)
kolors/models/modeling_chatglm.py:850
↓ 1 callersMethodquantize
(self, bits: int, empty_init=False, device=None, **kwargs)
kolors/models/modeling_chatglm.py:1196
↓ 1 callersFunctionrescale_noise_cfg
Rescale `noise_cfg` according to `guidance_rescale`. Based on findings of [Common Diffusion Noise Schedules and Sample Steps are Flawed](http
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:73
↓ 1 callersFunctionrescale_noise_cfg
Rescale `noise_cfg` according to `guidance_rescale`. Based on findings of [Common Diffusion Noise Schedules and Sample Steps are Flawed](http
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:105
↓ 1 callersFunctionrescale_noise_cfg
Rescale `noise_cfg` according to `guidance_rescale`. Based on findings of [Common Diffusion Noise Schedules and Sample Steps are Flawed](http
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256.py:70
↓ 1 callersFunctionrescale_noise_cfg
Rescale `noise_cfg` according to `guidance_rescale`. Based on findings of [Common Diffusion Noise Schedules and Sample Steps are Flawed](http
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:81
↓ 1 callersFunctionretrieve_timesteps
Calls the scheduler's `set_timesteps` method and retrieves timesteps from the scheduler after the call. Handles custom timesteps. Any kwargs
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:268
↓ 1 callersMethodset_attention_slice
r""" Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor in slices to comp
kolors/models/controlnet.py:609
↓ 1 callersMethodset_attention_slice
r""" Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor in slices to comp
kolors/models/unet_2d_condition.py:778
↓ 1 callersMethodset_face_fidelity_scale
(self, scale)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:643
↓ 1 callersMethodset_ip_adapter
(self, device, num_tokens = 6)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:573
↓ 1 callersFunctionsplit_tensor_along_last_dim
Split a tensor along its last dimension. Arguments: tensor: input tensor. num_partitions: number of partitions to split the tenso
kolors/models/modeling_chatglm.py:98
↓ 1 callersMethodstream_generate
( self, input_ids, generation_config: Optional[GenerationConfig] = None,
kolors/models/modeling_chatglm.py:1089
↓ 1 callersMethodtokenize
(self, s: str, encode_special_tokens=False)
kolors/models/tokenization_chatglm.py:34
↓ 1 callersFunctiontokenize_prompt
(tokenizer, prompt, tokenizer_max_length=None)
dreambooth/train_dreambooth_lora.py:672
↓ 1 callersFunctiontop_down_affine
Get the bbox image as the model input by affine transform. Args: input_size (dict): The input size of the model. bbox_scale (dict
controlnet/annotator/dwpose/onnxpose.py:255
↓ 1 callersMethodupcast_vae
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:553
↓ 1 callersMethodupcast_vae
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:1049
↓ 1 callersMethodupcast_vae
(self)
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:831
↓ 1 callersMethodupcast_vae
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256.py:535
↓ 1 callersMethodupcast_vae
(self)
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:623
↓ 1 callersFunctionwrite_pfm
Write pfm file. Args: path (str): pathto file image (array): data scale (int, optional): Scale. Defaults to 1.
controlnet/annotator/midas/utils.py:58
Method__call__
(self, img, low_threshold, high_threshold)
controlnet/annotator/canny/__init__.py:5
Method__call__
(self, oriImg)
controlnet/annotator/dwpose/wholebody.py:20
Method__call__
(self, oriImg)
controlnet/annotator/dwpose/__init__.py:50
Method__call__
(self, input_image)
controlnet/annotator/midas/__init__.py:18
Method__call__
(self, sample)
controlnet/annotator/midas/midas/transforms.py:162
Method__call__
(self, sample)
controlnet/annotator/midas/midas/transforms.py:205
Method__call__
(self, sample)
controlnet/annotator/midas/midas/transforms.py:218
Method__call__
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`, *optional*):
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter_FaceID.py:651
Method__call__
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`, *optional*):
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_inpainting.py:1140
Method__call__
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`, *optional*):
kolors/pipelines/pipeline_controlnet_xl_kolors_img2img.py:872
Method__call__
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`, *optional*):
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256.py:556
Method__call__
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`, *optional*):
kolors/pipelines/pipeline_stable_diffusion_xl_chatglm_256_ipadapter.py:644
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
kolors/models/modeling_chatglm.py:59
Method__call__
( self, attn, hidden_states, encoder_hidden_states=None, attention_mas
kolors/models/ipa_faceid_plus/attention_processor.py:19
Method__call__
( self, attn, hidden_states, encoder_hidden_states=None, attention_mas
kolors/models/ipa_faceid_plus/attention_processor.py:121
Method__getitem__
(self, index)
dreambooth/train_dreambooth_lora.py:543
Method__getitem__
(self, index)
dreambooth/train_dreambooth_lora.py:665
Method__init__
(self, root_dir = "./")
ipadapter_FaceID/sample_ipadapter_faceid_plus.py:26
Method__init__
( self, instance_data_root, instance_prompt, tokenizer, class_data_roo
dreambooth/train_dreambooth_lora.py:480
Method__init__
(self, prompt, num_samples)
dreambooth/train_dreambooth_lora.py:658
Method__init__
(self, unet, text_encoder)
dreambooth/train_dreambooth_lora.py:706
Method__init__
(self)
controlnet/annotator/dwpose/wholebody.py:9
Method__init__
(self)
controlnet/annotator/dwpose/__init__.py:33
Method__init__
(self, model_type)
controlnet/annotator/midas/api.py:158
Method__init__
(self)
controlnet/annotator/midas/__init__.py:14
Method__init__
(self, start_index=1)
controlnet/annotator/midas/midas/vit.py:19
Method__init__
(self, in_features, start_index=1)
controlnet/annotator/midas/midas/vit.py:32
Method__init__
(self, dim0, dim1)
controlnet/annotator/midas/midas/vit.py:46
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_custom.py:16
Method__init__
Init. Args: features (int): number of features
controlnet/annotator/midas/midas/blocks.py:159
Method__init__
Init. Args: features (int): number of features
controlnet/annotator/midas/midas/blocks.py:198
Method__init__
Init. Args: features (int): number of features
controlnet/annotator/midas/midas/blocks.py:235
← previousnext →101–200 of 381, ranked by callers