MCPcopy Index your code

hub / github.com/bronyayang/Law_of_Vision_Representation_in_MLLMs / functions

Functions12,826 in github.com/bronyayang/Law_of_Vision_Representation_in_MLLMs

↓ 1,866 callersMethodpop
(self, *args, **kwargs)
diffusers/src/diffusers/utils/outputs.py:101
↓ 1,343 callersMethodto
( self, torch_device: Optional[Union[str, torch.device]] = None, torch_dtype: Optional
diffusers/src/diffusers/pipelines/stable_diffusion/stable_unclip_image_normalizer.py:42
↓ 1,190 callersMethodto
(self, torch_device: Optional[Union[str, torch.device]] = None)
diffusers/examples/community/stable_unclip.py:181
↓ 1,086 callersMethodfrom_pretrained
(cls, path, model_cls)
diffusers/src/diffusers/training_utils.py:350
↓ 1,073 callersMethodinfo
(self, prefix)
diffusers/scripts/convert_stable_diffusion_controlnet_to_onnx.py:31
↓ 979 callersMethodflatten
(self, input, only_get_first=False)
llava/eval/lmms-eval/lmms_eval/models/fuyu.py:146
↓ 825 callersMethodto
(self, device)
diffusers/tests/pipelines/stable_diffusion_safe/test_safe_diffusion.py:103
↓ 808 callersMethodset_progress_bar_config
(self, **kwargs)
diffusers/src/diffusers/pipelines/pipeline_utils.py:1639
↓ 711 callersMethodfrom_pretrained
( cls, retriever_name_or_path: str, index: Index = None, dataset: Dataset = No
diffusers/examples/research_projects/rdm/retriever.py:145
↓ 707 callersFunctionrequires_backends
(obj, backends)
diffusers/src/diffusers/utils/import_utils.py:603
↓ 563 callersMethodupdate
(self, *args, **kwargs)
diffusers/src/diffusers/utils/outputs.py:104
↓ 529 callersMethodto
r""" Performs Pipeline dtype and/or device conversion. A torch.dtype and torch.device are inferred from the arguments of `self.to(*arg
diffusers/src/diffusers/pipelines/pipeline_utils.py:303
↓ 438 callersMethodto
(self, device)
diffusers/tests/pipelines/test_pipelines.py:1144
↓ 430 callersMethodtokenizer
(self)
llava/eval/lmms-eval/lmms_eval/models/fuyu.py:109
↓ 427 callersFunctiondeprecate
(*args, take_from: Optional[Union[Dict, Any]] = None, standard_warn=True, stacklevel=2)
diffusers/src/diffusers/utils/deprecation_utils.py:8
↓ 391 callersMethodtranspose
(self, data, **kwargs)
diffusers/examples/community/dps_pipeline.py:424
↓ 334 callersMethodto
r"""Move internal buffers of the ExponentialMovingAverage to `device`. Args: device: like `device` argument to `torch.Tensor.to`
diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/textual_inversion.py:318
↓ 322 callersMethodfrom_config
(cls, *args, **kwargs)
diffusers/src/diffusers/utils/dummy_pt_objects.py:432
↓ 309 callersMethodpipeline_class
(self)
diffusers/tests/pipelines/test_pipelines_common.py:878
↓ 302 callersMethodset_timesteps
(self, num_inference_steps: int)
diffusers/examples/community/iadb.py:51
↓ 290 callersMethodto
r"""Move internal buffers of the ExponentialMovingAverage to `device`. Args: device: like `device` argument to `torch.Tensor.to`
diffusers/src/diffusers/training_utils.py:444
↓ 272 callersMethodload_state_dict
r""" Args: Loads the ExponentialMovingAverage state. This method is used by accelerate during checkpointing to save the ema st
diffusers/src/diffusers/training_utils.py:502
↓ 259 callersFunctionrandn_tensor
A helper function to create random tensors on the desired `device` with the desired `dtype`. When passing a list of generators, you can seed each
diffusers/src/diffusers/utils/torch_utils.py:38
↓ 249 callersMethodload
(self)
diffusers/examples/community/stable_diffusion_tensorrt_inpaint.py:158
↓ 212 callersMethodregister_modules
(self, **kwargs)
diffusers/src/diffusers/pipelines/pipeline_utils.py:153
↓ 199 callersMethodset_timesteps
Sets the discrete timesteps used for the diffusion chain (to be run before inference). Args: num_inference_steps (`int`,
diffusers/src/diffusers/schedulers/scheduling_lcm.py:349
↓ 195 callersMethodcopy
(self)
llava/conversation.py:190
↓ 195 callersMethodstep
(self, parameters: Iterable[torch.nn.Parameter])
diffusers/src/diffusers/training_utils.py:394
↓ 192 callersMethodregister_to_config
(self, **kwargs)
diffusers/src/diffusers/configuration_utils.py:110
↓ 192 callersMethodresize
Resize image. Args: image (`PIL.Image.Image`, `np.ndarray` or `torch.Tensor`): The image input, can be a
diffusers/src/diffusers/image_processor.py:353
↓ 171 callersMethodupdate
(self, val, n=1)
diffusers/examples/vqgan/train_vqgan.py:70
↓ 169 callersFunctionis_torch_available
()
diffusers/src/diffusers/utils/import_utils.py:338
↓ 163 callersFunctionis_transformers_available
()
diffusers/src/diffusers/utils/import_utils.py:354
↓ 161 callersMethodstate_dict
r""" Returns the state of the ExponentialMovingAverage as a dict. This method is used by accelerate during checkpointing to save the e
diffusers/src/diffusers/training_utils.py:456
↓ 156 callersMethodsample
Args: t0: start time has shape [batch_size, *shape, 1] t1: finish time has shape [batch_size, *shape, 1]
diffusers/src/diffusers/pipelines/shap_e/renderer.py:366
↓ 156 callersMethodscale_model_input
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep. A
diffusers/src/diffusers/schedulers/scheduling_lcm.py:299
↓ 153 callersMethodmaybe_convert_prompt
r""" Processes prompts that include a special token corresponding to a multi-vector textual inversion embedding to be replaced with mu
diffusers/src/diffusers/loaders/textual_inversion.py:118
↓ 147 callersMethodfrom_pretrained
See `AutoTokenizer.from_pretrained` docstring.
llava/model/language_model/mpt/adapt_tokenizer.py:37
↓ 146 callersMethodsave_pretrained
(self, path)
diffusers/src/diffusers/training_utils.py:359
↓ 145 callersMethodstep
Predict the sample at the previous timestep by reversing the ODE. Core function to propagate the diffusion process from the learned m
diffusers/examples/community/iadb.py:18
↓ 141 callersMethodenable_model_cpu_offload
r""" Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared to `enable_sequenti
diffusers/src/diffusers/pipelines/pipeline_utils.py:1015
↓ 136 callersFunctioncallback
(obj)
diffusers/examples/community/tiled_upscaling.py:289
↓ 136 callersMethodstep
Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion process from the learned m
diffusers/src/diffusers/schedulers/scheduling_lcm.py:498
↓ 132 callersMethoddecode
(self, latent)
diffusers/examples/community/magic_mix.py:40
↓ 132 callersMethodencode
(self, img)
diffusers/examples/community/magic_mix.py:33
↓ 131 callersFunctionfloats_tensor
Creates a random float32 tensor
diffusers/src/diffusers/utils/testing_utils.py:192
↓ 129 callersMethodmaybe_free_model_hooks
r""" Function that offloads all components, removes all model hooks that were added when using `enable_model_cpu_offload` and then app
diffusers/src/diffusers/pipelines/pipeline_utils.py:1093
↓ 126 callersMethodadd_adapter
r""" Adds a new adapter to the current model for training. If no adapter name is passed, a default name is assigned to the adapter to
diffusers/src/diffusers/loaders/peft.py:36
↓ 121 callersFunctionenable_full_determinism
Helper function for reproducible behavior during distributed training. See - https://pytorch.org/docs/stable/notes/randomness.html for pytorc
diffusers/src/diffusers/utils/testing_utils.py:869
↓ 120 callersMethodadd_noise
( self, original_samples: torch.Tensor, noise: torch.Tensor, alpha: torch.Tens
diffusers/examples/community/iadb.py:54
↓ 115 callersFunctiontext_encoder
()
diffusers/scripts/convert_kakao_brain_unclip_to_diffusers.py:919
↓ 111 callersMethodset_default_attn_processor
Disables custom attention processors and sets the default attention implementation.
diffusers/src/diffusers/models/unets/uvit_2d.py:276
↓ 110 callersMethodcheck_over_configs
(self, time_step=0, **config)
diffusers/tests/schedulers/test_schedulers.py:370
↓ 110 callersMethoddecode
( self, h: torch.Tensor, force_not_quantize: bool = True, return_dict: bool = True )
diffusers/src/diffusers/pipelines/wuerstchen/modeling_paella_vq_model.py:143
↓ 110 callersMethodtrain
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`): The p
diffusers/examples/community/imagic_stable_diffusion.py:110
↓ 109 callersFunctionload_image
Loads `image` to a PIL Image. Args: image (`str` or `PIL.Image.Image`): The image to convert to the PIL Image format.
diffusers/src/diffusers/utils/testing_utils.py:434
↓ 108 callersFunctionnumpy_cosine_similarity_distance
(a, b)
diffusers/src/diffusers/utils/testing_utils.py:102
↓ 103 callersMethodsave_pretrained
(self, save_directory)
diffusers/examples/research_projects/rdm/retriever.py:167
↓ 102 callersMethodhead_to_batch_dim
r""" Reshape the tensor from `[batch_size, seq_len, dim]` to `[batch_size, seq_len, heads, dim // heads]` `heads` is the number of hea
diffusers/src/diffusers/models/attention_processor.py:584
↓ 99 callersMethodpostprocess
(self, sample: torch.Tensor, output_type: str = "pil")
diffusers/src/diffusers/pipelines/blip_diffusion/blip_image_processing.py:301
↓ 96 callersMethodinterpolate
Function invoked when using the prior pipeline for interpolation. Args: images_and_prompts (`List[Union[str, PIL.Image.I
diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_prior.py:174
↓ 96 callersFunctionload_numpy
(arry: Union[str, np.ndarray], local_path: Optional[str] = None)
diffusers/src/diffusers/utils/testing_utils.py:401
↓ 95 callersFunctioncreate_custom_forward
(module)
llava/model/language_model/mpt/hf_prefixlm_converter.py:207
↓ 95 callersMethodenable_attention_slicing
r""" Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor in slices to compu
diffusers/src/diffusers/pipelines/pipeline_utils.py:1703
↓ 94 callersMethodenable_xformers_memory_efficient_attention
r""" Enable memory efficient attention from [xFormers](https://facebookresearch.github.io/xformers/). When this option is enabled, yo
diffusers/src/diffusers/models/modeling_utils.py:224
↓ 94 callersMethodwrite
(self, buf)
llava/utils.py:73
↓ 93 callersMethodpad
(self, *inputs)
diffusers/examples/community/rerender_a_video.py:1188
↓ 91 callersFunctionscale_lora_layers
Adjust the weightage given to the LoRA layers of the model. Args: model (`torch.nn.Module`): The model to scale.
diffusers/src/diffusers/utils/peft_utils.py:103
↓ 90 callersMethodbackward
(ctx, do)
llava/model/language_model/mpt/flash_attn_triton.py:475
↓ 90 callersMethodnumpy_to_pil
Convert a NumPy image or a batch of images to a PIL image.
diffusers/src/diffusers/pipelines/pipeline_utils.py:1618
↓ 89 callersFunctionadjust_lora_scale_text_encoder
(text_encoder, lora_scale: float = 1.0)
diffusers/src/diffusers/models/lora.py:69
↓ 88 callersFunctionunscale_lora_layers
Removes the previously passed weight given to the LoRA layers of the model. Args: model (`torch.nn.Module`): The model t
diffusers/src/diffusers/utils/peft_utils.py:123
↓ 85 callersFunctioncheck_if_lora_correctly_set
Checks if the LoRA layers are correctly set with peft
diffusers/tests/lora/utils.py:58
↓ 85 callersMethoddummy_model
(self)
diffusers/tests/schedulers/test_schedulers.py:358
↓ 83 callersMethodformat
(self, record)
llava/eval/lmms-eval/lmms_eval/utils.py:58
↓ 82 callersMethodpostprocess
Postprocess the image output from tensor to `output_type`. Args: image (`torch.Tensor`): The image input
diffusers/src/diffusers/image_processor.py:596
↓ 80 callersMethodprogress_bar
(self, iterable=None, total=None, desc=None, leave=True)
diffusers/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py:315
↓ 80 callersMethodscale_model_input
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep. A
diffusers/examples/community/scheduling_ufogen.py:243
↓ 79 callersMethodstate_dict
(self, *args, destination=None, prefix="", keep_vars=False)
diffusers/src/diffusers/models/lora.py:111
↓ 77 callersMethodnumpy_to_pil
Convert a numpy image or a batch of images to a PIL image.
diffusers/src/diffusers/image_processor.py:105
↓ 76 callersMethodstep
(self, parameters)
diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/textual_inversion.py:290
↓ 75 callersFunctionis_wandb_available
()
diffusers/src/diffusers/utils/import_utils.py:398
↓ 74 callersFunctionunet
(hor)
diffusers/scripts/convert_models_diffuser_to_diffusers.py:15
↓ 72 callersMethodfrom_single_file
r""" Instantiate a [`DiffusionPipeline`] from pretrained pipeline weights saved in the `.ckpt` or `.safetensors` format. The pipeline
diffusers/src/diffusers/loaders/single_file.py:272
↓ 72 callersFunctionrun_command
Runs `command` with `subprocess.check_output` and will potentially return the `stdout`. Will also properly capture if an error occurred while
diffusers/examples/test_examples_utils.py:31
↓ 71 callersFunctionload_image
Loads `image` to a PIL Image. Args: image (`str` or `PIL.Image.Image`): The image to convert to the PIL Image format.
diffusers/src/diffusers/utils/loading_utils.py:9
↓ 71 callersMethodprogress_bar
(self, iterable=None, total=None)
diffusers/src/diffusers/pipelines/pipeline_utils.py:1624
↓ 70 callersFunctionis_accelerate_available
()
diffusers/src/diffusers/utils/import_utils.py:386
↓ 68 callersFunctionis_torch_version
Args: Compares the current PyTorch version to a given reference with an operation. operation (`str`): A string representa
diffusers/src/diffusers/utils/import_utils.py:667
↓ 65 callersFunctionset_seed
Args: Helper function for reproducible behavior to set the seed in `random`, `numpy`, `torch`. seed (`int`): The seed to set.
diffusers/src/diffusers/training_utils.py:36
↓ 64 callersMethodcuda
(self, dtype=torch.float16, use_xformers=False)
diffusers/examples/community/pipeline_stable_diffusion_xl_instantid.py:447
↓ 64 callersFunctionget_logger
Return a logger with the specified name. This function is not supposed to be directly accessed unless you are writing a custom diffusers mod
diffusers/src/diffusers/utils/logging.py:113
↓ 62 callersFunctioncheck_min_version
(min_version)
diffusers/src/diffusers/utils/__init__.py:124
↓ 62 callersFunctionget_scheduler
Unified API to get any scheduler from its name. Args: name (`str` or `SchedulerType`): The name of the scheduler to use.
diffusers/src/diffusers/optimization.py:289
↓ 61 callersMethodenable_sequential_cpu_offload
r""" Offloads all models to CPU using 🤗 Accelerate, significantly reducing memory usage. When called, the state dicts of all `torch.nn
diffusers/src/diffusers/pipelines/pipeline_utils.py:1107
↓ 61 callersMethodget_dummy_inputs
(self, device, seed=0)
diffusers/tests/pipelines/test_pipelines_common.py:890
↓ 61 callersFunctionget_objects_from_module
Args: Returns a dict of object names and values in a module, while skipping private/internal objects module (ModuleType):
diffusers/src/diffusers/utils/import_utils.py:735
↓ 59 callersFunctionconvert_state_dict_to_diffusers
r""" Converts a state dict to new diffusers format. The state dict can be from previous diffusers format (`OLD_DIFFUSERS`), or PEFT format (`P
diffusers/src/diffusers/utils/state_dict_utils.py:201
↓ 59 callersMethoddevice
`torch.device`: The device on which the module is (assuming that all the module parameters are on the same device).
diffusers/src/diffusers/models/modeling_utils.py:1016
↓ 59 callersMethodencode
(self, x: torch.Tensor, return_dict: bool = True)
diffusers/src/diffusers/pipelines/wuerstchen/modeling_paella_vq_model.py:133
next →1–100 of 12,826, ranked by callers