MCPcopy Create free account

hub / github.com/bronyayang/Law_of_Vision_Representation_in_MLLMs / functions

Functions12,826 in github.com/bronyayang/Law_of_Vision_Representation_in_MLLMs

↓ 59 callersMethodget_input_embeddings
(self)
diffusers/src/diffusers/pipelines/blip_diffusion/modeling_blip2.py:421
↓ 59 callersFunctionis_compiled_module
Check whether the module was compiled with torch.compile()
diffusers/src/diffusers/utils/torch_utils.py:86
↓ 57 callersMethodenable_gradient_checkpointing
Activates gradient checkpointing for the current model (may be referred to as *activation checkpointing* or *checkpoint activations*
diffusers/src/diffusers/models/modeling_utils.py:160
↓ 54 callersMethodresize
Resize an image to `(size["height"], size["width"])`. Args: image (`np.ndarray`): Image to resize.
diffusers/src/diffusers/pipelines/blip_diffusion/blip_image_processing.py:116
↓ 53 callersMethodadd_noise
( self, original_samples: torch.Tensor, noise: torch.Tensor, timesteps: torch.
diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_img2img.py:267
↓ 53 callersFunctionis_xformers_available
()
diffusers/src/diffusers/utils/import_utils.py:382
↓ 53 callersMethodto
(self, device)
diffusers/examples/consistency_distillation/train_lcm_distill_sd_wds.py:407
↓ 50 callersMethodload_lora_weights
Load LoRA weights specified in `pretrained_model_name_or_path_or_dict` into `self.unet` and `self.text_encoder`. All kwargs
diffusers/src/diffusers/loaders/lora.py:79
↓ 49 callersMethodset_attn_processor
r""" Sets the attention processor to use to compute attention. Parameters: processor (`dict` of `AttentionProcessor` or o
diffusers/src/diffusers/models/unets/uvit_2d.py:241
↓ 48 callersMethodpreprocess
Preprocess an image or batch of images. Args: images (`ImageInput`): Image to preprocess. Expects a sing
diffusers/src/diffusers/pipelines/blip_diffusion/blip_image_processing.py:164
↓ 47 callersMethodget_velocity
(self, sample: torch.Tensor, noise: torch.Tensor, timesteps: torch.IntTensor)
diffusers/examples/community/scheduling_ufogen.py:486
↓ 47 callersMethodgroup
Groups elements of an iterable based on a provided function. Parameters: - arr (Iterable): The iterable to be grouped.
llava/eval/lmms-eval/lmms_eval/utils.py:854
↓ 45 callersMethodsave_config
Save a configuration object to the directory specified in `save_directory` so that it can be reloaded using the [`~ConfigMixin.from_c
diffusers/src/diffusers/configuration_utils.py:145
↓ 44 callersMethodapply
(self, pipe, i, t, callback_kwargs)
diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion.py:805
↓ 44 callersMethodprepare_attention_mask
r""" Prepare the attention mask for the attention computation. Args: attention_mask (`torch.Tensor`): The
diffusers/src/diffusers/models/attention_processor.py:658
↓ 43 callersMethod_test_inference_batch_single_identical
( self, batch_size=2, expected_max_diff=1e-4, additional_params_copy_to_batche
diffusers/tests/pipelines/test_pipelines_common.py:1084
↓ 42 callersMethodfrom_pipe
r""" Create a new pipeline from a given pipeline. This method is useful to create a new pipeline from the existing pipeline components
diffusers/src/diffusers/pipelines/pipeline_utils.py:1760
↓ 42 callersMethodget_dummy_components
(self)
diffusers/tests/pipelines/test_pipelines_common.py:884
↓ 41 callersMethodencode
(self, text, *args, vector_shuffle=False, prop_tokens_to_load=1.0, **kwargs)
diffusers/examples/research_projects/multi_token_textual_inversion/multi_token_clip.py:97
↓ 41 callersFunctionto_np
(tensor)
diffusers/tests/pipelines/test_pipelines_common.py:58
↓ 41 callersFunctiontokenizer_image_token
(prompt, tokenizer, image_token_index=IMAGE_TOKEN_INDEX, return_tensors=None)
llava/mm_utils.py:98
↓ 40 callersMethod_get_variance
(self, timestep, prev_timestep)
diffusers/src/diffusers/schedulers/scheduling_tcd.py:318
↓ 40 callersMethodsave_lora_weights
( self, save_directory: Union[str, os.PathLike], unet_lora_layers: Dict[str, Union[tor
diffusers/examples/community/pipeline_demofusion_sdxl.py:1351
↓ 40 callersMethodset_processor
r""" Set the attention processor to use. Args: processor (`AttnProcessor`): The attention processor to us
diffusers/src/diffusers/models/attention_processor.py:411
↓ 39 callersMethodload_config
r""" Load a model or scheduler configuration. Parameters: pretrained_model_name_or_path (`str` or `os.PathLike`, *optiona
diffusers/src/diffusers/configuration_utils.py:288
↓ 39 callersFunctiontorch_all_close
(a, b, *args, **kwargs)
diffusers/src/diffusers/utils/testing_utils.py:94
↓ 38 callersFunctionis_flax_available
()
diffusers/src/diffusers/utils/import_utils.py:350
↓ 38 callersMethodto_tuple
Convert self to a tuple containing all the attributes/keys that are not `None`.
diffusers/src/diffusers/utils/outputs.py:133
↓ 37 callersFunctiongenerate_submission_file
(file_name, args, subpath="submissions")
llava/eval/lmms-eval/lmms_eval/tasks/_task_utils/file_utils.py:4
↓ 37 callersMethodstore
r""" Args: Save the current parameters for restoring later. parameters: Iterable of `torch.nn.Parameter`; the parameters t
diffusers/src/diffusers/training_utils.py:475
↓ 37 callersMethodunload_lora_weights
Unloads the LoRA parameters. Examples: ```python >>> # Assuming `pipeline` is already loaded with the LoRA paramete
diffusers/src/diffusers/loaders/lora.py:725
↓ 36 callersMethod_test_attention_slicing_forward_pass
( self, test_max_difference=True, test_mean_pixel_difference=True, expected_max_diff=1e-3 )
diffusers/tests/pipelines/test_pipelines_common.py:1329
↓ 36 callersMethodpreprocess
Preprocess the image input. Args: image (`pipeline_image_input`): The image input, accepted formats are
diffusers/src/diffusers/image_processor.py:469
↓ 36 callersMethodprogress_bar
(self, iterable=None, total=None)
diffusers/src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_combined.py:144
↓ 35 callersMethodmode
(self)
diffusers/src/diffusers/models/vae_flax.py:722
↓ 35 callersMethodnorm_encoder_hidden_states
r""" Normalize the encoder hidden states. Requires `self.norm_cross` to be specified when constructing the `Attention` class.
diffusers/src/diffusers/models/attention_processor.py:705
↓ 34 callersMethod_compare_component_configs
(self, pipe, single_file_pipe)
diffusers/tests/single_file/single_file_testing_utils.py:49
↓ 33 callersMethodcopy_to
Copy current averaged parameters into given collection of parameters. Args: parameters: Iterable of `torch.nn.Parameter`;
diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/textual_inversion.py:305
↓ 32 callersFunctionassign_to_checkpoint
This does the final conversion step: take locally converted weights and apply a global renaming to them. It splits attention layers, and take
diffusers/src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py:168
↓ 32 callersMethodbatch_to_head_dim
r""" Reshape the tensor from `[batch_size, seq_len, dim]` to `[batch_size // heads, seq_len, dim * heads]`. `heads` is the number of h
diffusers/src/diffusers/models/attention_processor.py:567
↓ 31 callersMethodappend_message
(self, role, message)
llava/conversation.py:106
↓ 31 callersFunctionis_invisible_watermark_available
()
diffusers/src/diffusers/utils/import_utils.py:422
↓ 31 callersMethodto
(self, device)
diffusers/examples/consistency_distillation/train_lcm_distill_sdxl_wds.py:440
↓ 29 callersMethod_test_xformers_attention_forwardGenerator_pass
( self, test_max_difference=True, test_mean_pixel_difference=True, expected_max_diff=1e-4 )
diffusers/tests/pipelines/test_pipelines_common.py:1607
↓ 29 callersMethodpreprocess
(self, image, scale, resample)
diffusers/examples/custom_diffusion/train_custom_diffusion.py:238
↓ 29 callersMethodto
(self, device)
diffusers/examples/consistency_distillation/train_lcm_distill_lora_sdxl_wds.py:417
↓ 28 callersMethodget_attention_scores
r""" Compute the attention scores. Args: query (`torch.Tensor`): The query tensor. key (`torch.Tensor`): The
diffusers/src/diffusers/models/attention_processor.py:611
↓ 28 callersMethodpop
(self, *args, **kwargs)
diffusers/src/diffusers/configuration_utils.py:70
↓ 27 callersMethoddecode
(self, encodings_and_masks, input_tokens, noise_time)
diffusers/src/diffusers/pipelines/deprecated/spectrogram_diffusion/pipeline_spectrogram_diffusion.py:114
↓ 27 callersFunctionget_activation
Helper function to get activation function from string. Args: act_fn (str): Name of activation function. Returns: nn.Module:
diffusers/src/diffusers/models/activations.py:36
↓ 27 callersMethodload_lora_weights
(self, pretrained_model_name_or_path_or_dict: Union[str, Dict[str, torch.Tensor]], **kwargs)
diffusers/examples/community/pipeline_demofusion_sdxl.py:1289
↓ 27 callersFunctionload_or_create_model_card
Loads or creates a model card. Args: repo_id_or_path (`str`): The repo id (e.g., "runwayml/stable-diffusion-v1-5") or lo
diffusers/src/diffusers/utils/hub_utils.py:99
↓ 27 callersFunctionpopulate_model_card
Populates the `model_card` with library name and optional tags.
diffusers/src/diffusers/utils/hub_utils.py:169
↓ 27 callersMethodset_adapters
( self, adapter_names: Union[List[str], str], adapter_weights: Optional[Union[float, D
diffusers/src/diffusers/loaders/lora.py:946
↓ 26 callersMethod__init__
(self, num_channels: int, flip_sin_to_cos: bool, downscale_freq_shift: float)
diffusers/src/diffusers/models/embeddings.py:389
↓ 26 callersMethod__init__
( self, in_channels: int, prev_output_channel: int, out_channels: int,
diffusers/src/diffusers/models/unets/unet_2d_blocks.py:2568
↓ 26 callersMethodget_dummy_components
(self, scheduler_cls=None, use_dora=False)
diffusers/tests/lora/utils.py:77
↓ 26 callersMethodload_textual_inversion
r""" Load Textual Inversion embeddings into the text encoder of [`StableDiffusionPipeline`] (both 🤗 Diffusers and Automatic1111 format
diffusers/src/diffusers/loaders/textual_inversion.py:267
↓ 26 callersMethodprepare_init_args_and_inputs_for_common
(self)
diffusers/tests/models/unets/test_models_unet_2d_condition.py:378
↓ 25 callersFunctionassert_param_count
(model_1, model_2)
diffusers/scripts/convert_if.py:1176
↓ 25 callersMethodget_dummy_inputs
(self, with_generator=True)
diffusers/tests/lora/utils.py:138
↓ 25 callersMethodget_dummy_inputs
(self, device, seed=0)
diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion.py:187
↓ 25 callersMethodprepare_init_args_and_inputs_for_common
(self)
diffusers/tests/models/autoencoders/test_models_vq.py:55
↓ 25 callersFunctionto_np
(tensor)
diffusers/tests/pipelines/pia/test_pia.py:23
↓ 24 callersMethodcreate_state
(self, common: Optional[CommonSchedulerState] = None)
diffusers/src/diffusers/schedulers/scheduling_pndm_flax.py:141
↓ 24 callersMethodget_dummy_inputs
(self, device, seed=0)
diffusers/tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl.py:151
↓ 24 callersMethodnormalize
Normalize an image array to [-1,1].
diffusers/src/diffusers/image_processor.py:152
↓ 24 callersFunctiontrain_transforms
(img)
diffusers/examples/kandinsky2_2/text_to_image/train_text_to_image_decoder.py:651
↓ 23 callersMethodcount
(splits, choices="ABCD", prefix="", suffix="")
llava/eval/lmms-eval/lmms_eval/tasks/mmbench/mmbench_evals.py:89
↓ 23 callersMethodfrom_pretrained
r""" Instantiate a pretrained MultiControlNet model from multiple pre-trained controlnet models. The model is set in evaluation mode
diffusers/src/diffusers/pipelines/controlnet/multicontrolnet.py:114
↓ 23 callersMethodgenerate
( self, inputs: Optional[torch.Tensor] = None, images: Optional[torch.Tensor] = None,
llava/model/language_model/llava_llama.py:106
↓ 23 callersMethodoptimize
(self, onnx_graph)
diffusers/examples/community/stable_diffusion_tensorrt_inpaint.py:451
↓ 23 callersMethodsort
(a, b)
diffusers/src/diffusers/schedulers/scheduling_dpmsolver_sde.py:44
↓ 23 callersMethodto
(self, device)
diffusers/examples/consistency_distillation/train_lcm_distill_lora_sd_wds.py:429
↓ 22 callersFunctionassert_mean_pixel_difference
(image, expected_image, expected_max_diff=10)
diffusers/tests/pipelines/test_pipelines_common.py:2109
↓ 22 callersMethoddownload
r""" Download and cache a PyTorch diffusion pipeline from pretrained pipeline weights. Parameters: pretrained_model_name
diffusers/src/diffusers/pipelines/pipeline_utils.py:1183
↓ 22 callersFunctiondownload_single_file_checkpoint
(repo_id, filename, tmpdir)
diffusers/tests/single_file/single_file_testing_utils.py:15
↓ 22 callersMethodget_dummy_components
(self, time_cond_proj_dim=None)
diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion.py:127
↓ 22 callersMethodload_ip_adapter
Parameters: pretrained_model_name_or_path_or_dict (`str` or `List[str]` or `os.PathLike` or `List[os.PathLike]` or `dict` or `Lis
diffusers/src/diffusers/loaders/ip_adapter.py:55
↓ 22 callersMethodto
(self, device)
diffusers/examples/consistency_distillation/train_lcm_distill_lora_sdxl.py:93
↓ 22 callersMethodwalk
Walks through a series of prompts and seeds, interpolating between them and saving the results to disk. Args: prompts (`
diffusers/examples/community/interpolate_stable_diffusion.py:399
↓ 21 callersMethodcrop
(self, im, new_width, new_height)
diffusers/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py:514
↓ 21 callersMethodget_dummy_inputs
( self, for_image_to_image=False, for_inpainting=False, for_sdxl=False, for_masks=False, for_instant_s
diffusers/tests/pipelines/ip_adapters/test_ip_adapter_stable_diffusion.py:75
↓ 21 callersMethodget_dummy_inputs
(self, device, seed=0)
diffusers/tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py:172
↓ 21 callersMethodget_dummy_inputs
(self, device, seed=0)
diffusers/tests/pipelines/stable_video_diffusion/test_stable_video_diffusion.py:125
↓ 21 callersMethodget_prompt
(self)
llava/conversation.py:29
↓ 21 callersMethodpil_to_numpy
Convert a PIL image or a list of PIL images to NumPy arrays.
diffusers/src/diffusers/image_processor.py:121
↓ 20 callersMethodapply_watermark
(self, images: List[PIL.Image.Image], sample_size=None)
diffusers/src/diffusers/pipelines/deepfloyd_if/watermark.py:19
↓ 20 callersFunctioncast_training_params
(model: Union[torch.nn.Module, List[torch.nn.Module]], dtype=torch.float32)
diffusers/src/diffusers/training_utils.py:195
↓ 20 callersMethodfuse_lora
r""" Fuses the LoRA parameters into the original parameters of the corresponding blocks. <Tip warning={true}> This is an exp
diffusers/src/diffusers/loaders/lora.py:746
↓ 20 callersFunctionis_onnx_available
()
diffusers/src/diffusers/utils/import_utils.py:366
↓ 20 callersMethodlora_state_dict
r""" Return state dict for lora weights and the network alphas. <Tip warning={true}> We support loading A1111 formatted LoRA
diffusers/src/diffusers/loaders/lora.py:139
↓ 20 callersMethodpredict
Args: original_image (np.ndarray): an image of shape (H, W, C) (in BGR order). Returns: predictions (dict):
C_score/model_utils/extractor_sd.py:93
↓ 20 callersMethodtest_output
(self)
diffusers/tests/models/unets/test_unet_2d_blocks.py:208
↓ 19 callersFunctioncompute_snr
Computes SNR as per https://github.com/TiankaiHang/Min-SNR-Diffusion-Training/blob/521b624bd70c67cee4bdf49225915f5945a872e3/guided_diffusion/
diffusers/src/diffusers/training_utils.py:52
↓ 19 callersMethodget_model
(self)
llava/model/llava_arch.py:254
↓ 19 callersMethodinputs_dict
(self, seed=None)
diffusers/tests/models/autoencoders/test_models_vae.py:363
↓ 19 callersFunctionto_np
(tensor)
diffusers/tests/pipelines/stable_video_diffusion/test_stable_video_diffusion.py:39
↓ 18 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
diffusers/src/diffusers/schedulers/scheduling_sasolver.py:366
↓ 18 callersMethodget_dummy_inputs_by_type
(self, device, seed=0, input_image_type="pt", output_type="np")
diffusers/tests/pipelines/test_pipelines_common.py:487
← previousnext →101–200 of 12,826, ranked by callers