Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/bronyayang/Law_of_Vision_Representation_in_MLLMs
/ functions
Functions
12,826 in github.com/bronyayang/Law_of_Vision_Representation_in_MLLMs
⨍
Functions
12,826
◇
Types & classes
1,844
↳
Endpoints
18
↓ 1,866 callers
Method
pop
(self, *args, **kwargs)
diffusers/src/diffusers/utils/outputs.py:101
↓ 1,343 callers
Method
to
( 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 callers
Method
to
(self, torch_device: Optional[Union[str, torch.device]] = None)
diffusers/examples/community/stable_unclip.py:181
↓ 1,086 callers
Method
from_pretrained
(cls, path, model_cls)
diffusers/src/diffusers/training_utils.py:350
↓ 1,073 callers
Method
info
(self, prefix)
diffusers/scripts/convert_stable_diffusion_controlnet_to_onnx.py:31
↓ 979 callers
Method
flatten
(self, input, only_get_first=False)
llava/eval/lmms-eval/lmms_eval/models/fuyu.py:146
↓ 825 callers
Method
to
(self, device)
diffusers/tests/pipelines/stable_diffusion_safe/test_safe_diffusion.py:103
↓ 808 callers
Method
set_progress_bar_config
(self, **kwargs)
diffusers/src/diffusers/pipelines/pipeline_utils.py:1639
↓ 711 callers
Method
from_pretrained
( cls, retriever_name_or_path: str, index: Index = None, dataset: Dataset = No
diffusers/examples/research_projects/rdm/retriever.py:145
↓ 707 callers
Function
requires_backends
(obj, backends)
diffusers/src/diffusers/utils/import_utils.py:603
↓ 563 callers
Method
update
(self, *args, **kwargs)
diffusers/src/diffusers/utils/outputs.py:104
↓ 529 callers
Method
to
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 callers
Method
to
(self, device)
diffusers/tests/pipelines/test_pipelines.py:1144
↓ 430 callers
Method
tokenizer
(self)
llava/eval/lmms-eval/lmms_eval/models/fuyu.py:109
↓ 427 callers
Function
deprecate
(*args, take_from: Optional[Union[Dict, Any]] = None, standard_warn=True, stacklevel=2)
diffusers/src/diffusers/utils/deprecation_utils.py:8
↓ 391 callers
Method
transpose
(self, data, **kwargs)
diffusers/examples/community/dps_pipeline.py:424
↓ 334 callers
Method
to
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 callers
Method
from_config
(cls, *args, **kwargs)
diffusers/src/diffusers/utils/dummy_pt_objects.py:432
↓ 309 callers
Method
pipeline_class
(self)
diffusers/tests/pipelines/test_pipelines_common.py:878
↓ 302 callers
Method
set_timesteps
(self, num_inference_steps: int)
diffusers/examples/community/iadb.py:51
↓ 290 callers
Method
to
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 callers
Method
load_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 callers
Function
randn_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 callers
Method
load
(self)
diffusers/examples/community/stable_diffusion_tensorrt_inpaint.py:158
↓ 212 callers
Method
register_modules
(self, **kwargs)
diffusers/src/diffusers/pipelines/pipeline_utils.py:153
↓ 199 callers
Method
set_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 callers
Method
copy
(self)
llava/conversation.py:190
↓ 195 callers
Method
step
(self, parameters: Iterable[torch.nn.Parameter])
diffusers/src/diffusers/training_utils.py:394
↓ 192 callers
Method
register_to_config
(self, **kwargs)
diffusers/src/diffusers/configuration_utils.py:110
↓ 192 callers
Method
resize
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 callers
Method
update
(self, val, n=1)
diffusers/examples/vqgan/train_vqgan.py:70
↓ 169 callers
Function
is_torch_available
()
diffusers/src/diffusers/utils/import_utils.py:338
↓ 163 callers
Function
is_transformers_available
()
diffusers/src/diffusers/utils/import_utils.py:354
↓ 161 callers
Method
state_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 callers
Method
sample
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 callers
Method
scale_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 callers
Method
maybe_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 callers
Method
from_pretrained
See `AutoTokenizer.from_pretrained` docstring.
llava/model/language_model/mpt/adapt_tokenizer.py:37
↓ 146 callers
Method
save_pretrained
(self, path)
diffusers/src/diffusers/training_utils.py:359
↓ 145 callers
Method
step
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 callers
Method
enable_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 callers
Function
callback
(obj)
diffusers/examples/community/tiled_upscaling.py:289
↓ 136 callers
Method
step
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 callers
Method
decode
(self, latent)
diffusers/examples/community/magic_mix.py:40
↓ 132 callers
Method
encode
(self, img)
diffusers/examples/community/magic_mix.py:33
↓ 131 callers
Function
floats_tensor
Creates a random float32 tensor
diffusers/src/diffusers/utils/testing_utils.py:192
↓ 129 callers
Method
maybe_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 callers
Method
add_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 callers
Function
enable_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 callers
Method
add_noise
( self, original_samples: torch.Tensor, noise: torch.Tensor, alpha: torch.Tens
diffusers/examples/community/iadb.py:54
↓ 115 callers
Function
text_encoder
()
diffusers/scripts/convert_kakao_brain_unclip_to_diffusers.py:919
↓ 111 callers
Method
set_default_attn_processor
Disables custom attention processors and sets the default attention implementation.
diffusers/src/diffusers/models/unets/uvit_2d.py:276
↓ 110 callers
Method
check_over_configs
(self, time_step=0, **config)
diffusers/tests/schedulers/test_schedulers.py:370
↓ 110 callers
Method
decode
( 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 callers
Method
train
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 callers
Function
load_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 callers
Function
numpy_cosine_similarity_distance
(a, b)
diffusers/src/diffusers/utils/testing_utils.py:102
↓ 103 callers
Method
save_pretrained
(self, save_directory)
diffusers/examples/research_projects/rdm/retriever.py:167
↓ 102 callers
Method
head_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 callers
Method
postprocess
(self, sample: torch.Tensor, output_type: str = "pil")
diffusers/src/diffusers/pipelines/blip_diffusion/blip_image_processing.py:301
↓ 96 callers
Method
interpolate
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 callers
Function
load_numpy
(arry: Union[str, np.ndarray], local_path: Optional[str] = None)
diffusers/src/diffusers/utils/testing_utils.py:401
↓ 95 callers
Function
create_custom_forward
(module)
llava/model/language_model/mpt/hf_prefixlm_converter.py:207
↓ 95 callers
Method
enable_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 callers
Method
enable_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 callers
Method
write
(self, buf)
llava/utils.py:73
↓ 93 callers
Method
pad
(self, *inputs)
diffusers/examples/community/rerender_a_video.py:1188
↓ 91 callers
Function
scale_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 callers
Method
backward
(ctx, do)
llava/model/language_model/mpt/flash_attn_triton.py:475
↓ 90 callers
Method
numpy_to_pil
Convert a NumPy image or a batch of images to a PIL image.
diffusers/src/diffusers/pipelines/pipeline_utils.py:1618
↓ 89 callers
Function
adjust_lora_scale_text_encoder
(text_encoder, lora_scale: float = 1.0)
diffusers/src/diffusers/models/lora.py:69
↓ 88 callers
Function
unscale_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 callers
Function
check_if_lora_correctly_set
Checks if the LoRA layers are correctly set with peft
diffusers/tests/lora/utils.py:58
↓ 85 callers
Method
dummy_model
(self)
diffusers/tests/schedulers/test_schedulers.py:358
↓ 83 callers
Method
format
(self, record)
llava/eval/lmms-eval/lmms_eval/utils.py:58
↓ 82 callers
Method
postprocess
Postprocess the image output from tensor to `output_type`. Args: image (`torch.Tensor`): The image input
diffusers/src/diffusers/image_processor.py:596
↓ 80 callers
Method
progress_bar
(self, iterable=None, total=None, desc=None, leave=True)
diffusers/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py:315
↓ 80 callers
Method
scale_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 callers
Method
state_dict
(self, *args, destination=None, prefix="", keep_vars=False)
diffusers/src/diffusers/models/lora.py:111
↓ 77 callers
Method
numpy_to_pil
Convert a numpy image or a batch of images to a PIL image.
diffusers/src/diffusers/image_processor.py:105
↓ 76 callers
Method
step
(self, parameters)
diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/textual_inversion.py:290
↓ 75 callers
Function
is_wandb_available
()
diffusers/src/diffusers/utils/import_utils.py:398
↓ 74 callers
Function
unet
(hor)
diffusers/scripts/convert_models_diffuser_to_diffusers.py:15
↓ 72 callers
Method
from_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 callers
Function
run_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 callers
Function
load_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 callers
Method
progress_bar
(self, iterable=None, total=None)
diffusers/src/diffusers/pipelines/pipeline_utils.py:1624
↓ 70 callers
Function
is_accelerate_available
()
diffusers/src/diffusers/utils/import_utils.py:386
↓ 68 callers
Function
is_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 callers
Function
set_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 callers
Method
cuda
(self, dtype=torch.float16, use_xformers=False)
diffusers/examples/community/pipeline_stable_diffusion_xl_instantid.py:447
↓ 64 callers
Function
get_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 callers
Function
check_min_version
(min_version)
diffusers/src/diffusers/utils/__init__.py:124
↓ 62 callers
Function
get_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 callers
Method
enable_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 callers
Method
get_dummy_inputs
(self, device, seed=0)
diffusers/tests/pipelines/test_pipelines_common.py:890
↓ 61 callers
Function
get_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 callers
Function
convert_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 callers
Method
device
`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 callers
Method
encode
(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