MCPcopy Create free account

hub / github.com/YesianRohn/TextSSR / functions

Functions13,352 in github.com/YesianRohn/TextSSR

↓ 2,288 callersMethodpop
(self, *args, **kwargs)
diffusers/src/diffusers/utils/outputs.py:101
↓ 1,905 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,322 callersMethodto
(self, torch_device: Optional[Union[str, torch.device]] = None)
diffusers/examples/community/stable_unclip.py:181
↓ 1,245 callersMethodfrom_pretrained
(cls, path, model_cls, foreach=False)
diffusers/src/diffusers/training_utils.py:366
↓ 1,041 callersMethodinfo
(self, prefix)
diffusers/scripts/convert_stable_diffusion_controlnet_to_onnx.py:31
↓ 1,015 callersMethodto
(self, device)
diffusers/tests/pipelines/stable_diffusion_safe/test_safe_diffusion.py:103
↓ 984 callersMethodset_progress_bar_config
(self, **kwargs)
diffusers/src/diffusers/pipelines/pipeline_utils.py:1609
↓ 872 callersFunctionrequires_backends
(obj, backends)
diffusers/src/diffusers/utils/import_utils.py:625
↓ 794 callersMethodfrom_pretrained
( cls, retriever_name_or_path: str, index: Index = None, dataset: Dataset = No
diffusers/examples/research_projects/rdm/retriever.py:143
↓ 607 callersMethodupdate
(self, *args, **kwargs)
diffusers/src/diffusers/utils/outputs.py:104
↓ 595 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:318
↓ 501 callersMethodtranspose
(self, data, **kwargs)
diffusers/examples/community/dps_pipeline.py:424
↓ 496 callersMethodto
(self, device)
diffusers/tests/pipelines/test_pipelines.py:1248
↓ 470 callersMethodpipeline_class
(self)
diffusers/tests/pipelines/test_pipelines_common.py:906
↓ 459 callersFunctiondeprecate
(*args, take_from: Optional[Union[Dict, Any]] = None, standard_warn=True, stacklevel=2)
diffusers/src/diffusers/utils/deprecation_utils.py:8
↓ 359 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
↓ 334 callersMethodfrom_config
(cls, *args, **kwargs)
diffusers/src/diffusers/utils/dummy_pt_objects.py:657
↓ 321 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
↓ 314 callersMethodset_timesteps
(self, num_inference_steps: int)
diffusers/examples/community/iadb.py:51
↓ 291 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
↓ 286 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:561
↓ 256 callersMethodregister_modules
(self, **kwargs)
diffusers/src/diffusers/pipelines/pipeline_utils.py:156
↓ 219 callersMethodregister_to_config
(self, **kwargs)
diffusers/src/diffusers/configuration_utils.py:110
↓ 206 callersMethodstep
(self, parameters: Iterable[torch.nn.Parameter])
diffusers/src/diffusers/training_utils.py:410
↓ 202 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
↓ 194 callersFunctionis_torch_available
()
diffusers/src/diffusers/utils/import_utils.py:343
↓ 192 callersFunctionis_transformers_available
()
diffusers/src/diffusers/utils/import_utils.py:359
↓ 185 callersMethodupdate
(self, val, n=1)
diffusers/examples/vqgan/train_vqgan.py:70
↓ 184 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
↓ 182 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
↓ 181 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:115
↓ 175 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
↓ 173 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:983
↓ 170 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:1061
↓ 160 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
↓ 158 callersMethodsave_pretrained
(self, path)
diffusers/src/diffusers/training_utils.py:375
↓ 156 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:902
↓ 149 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:510
↓ 149 callersFunctiontext_encoder
()
diffusers/scripts/convert_kakao_brain_unclip_to_diffusers.py:919
↓ 147 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
↓ 145 callersFunctionfloats_tensor
Creates a random float32 tensor
diffusers/src/diffusers/utils/testing_utils.py:193
↓ 144 callersMethoddecode
(self, t: List[int])
diffusers/src/diffusers/pipelines/kolors/tokenizer.py:73
↓ 141 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:112
↓ 140 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
↓ 139 callersFunctioncallback
(obj)
diffusers/examples/community/tiled_upscaling.py:289
↓ 137 callersMethodload
(self)
diffusers/examples/community/stable_diffusion_tensorrt_inpaint.py:151
↓ 134 callersMethodencode
(self, img)
diffusers/examples/community/magic_mix.py:33
↓ 132 callersMethodpostprocess
(self, sample: torch.Tensor, output_type: str = "pil")
diffusers/src/diffusers/pipelines/blip_diffusion/blip_image_processing.py:301
↓ 132 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:496
↓ 123 callersMethoddecode
(self, latent)
diffusers/examples/community/magic_mix.py:40
↓ 122 callersMethodadd_noise
( self, original_samples: torch.Tensor, noise: torch.Tensor, alpha: torch.Tens
diffusers/examples/community/iadb.py:54
↓ 120 callersMethodset_default_attn_processor
Disables custom attention processors and sets the default attention implementation.
diffusers/src/diffusers/models/unets/uvit_2d.py:276
↓ 119 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
↓ 113 callersMethodpad
(self, *inputs)
diffusers/examples/community/rerender_a_video.py:1188
↓ 113 callersMethodsave_pretrained
(self, save_directory)
diffusers/examples/research_projects/rdm/retriever.py:165
↓ 112 callersMethodprogress_bar
(self, iterable=None, total=None, desc=None, leave=True)
diffusers/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py:315
↓ 111 callersFunctionadjust_lora_scale_text_encoder
(text_encoder, lora_scale: float = 1.0)
diffusers/src/diffusers/models/lora.py:69
↓ 110 callersMethodcheck_over_configs
(self, time_step=0, **config)
diffusers/tests/schedulers/test_schedulers.py:370
↓ 105 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:467
↓ 103 callersMethodto
(self, device)
diffusers/examples/consistency_distillation/train_lcm_distill_sd_wds.py:407
↓ 102 callersMethodencode
(self, s: str, bos: bool = False, eos: bool = False)
diffusers/src/diffusers/pipelines/kolors/tokenizer.py:64
↓ 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:515
↓ 102 callersFunctionnumpy_cosine_similarity_distance
(a, b)
diffusers/src/diffusers/utils/testing_utils.py:102
↓ 101 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:221
↓ 97 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
↓ 97 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
↓ 96 callersMethodnumpy_to_pil
Convert a NumPy image or a batch of images to a PIL image.
diffusers/src/diffusers/pipelines/pipeline_utils.py:1588
↓ 94 callersFunctioncheck_if_lora_correctly_set
Checks if the LoRA layers are correctly set with peft
diffusers/tests/lora/utils.py:59
↓ 91 callersMethodpostprocess
Postprocess the image output from tensor to `output_type`. Args: image (`torch.Tensor`): The image input
diffusers/src/diffusers/image_processor.py:596
↓ 89 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:1730
↓ 89 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
↓ 88 callersFunctionis_wandb_available
()
diffusers/src/diffusers/utils/import_utils.py:403
↓ 85 callersMethoddummy_model
(self)
diffusers/tests/schedulers/test_schedulers.py:358
↓ 84 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:1673
↓ 84 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
↓ 83 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:270
↓ 83 callersFunctionis_torch_version
Compares the current PyTorch version to a given reference with an operation. Args: operation (`str`): A string represent
diffusers/src/diffusers/utils/import_utils.py:690
↓ 83 callersMethodnumpy_to_pil
Convert a numpy image or a batch of images to a PIL image.
diffusers/src/diffusers/image_processor.py:105
↓ 83 callersMethodstate_dict
(self, *args, destination=None, prefix="", keep_vars=False)
diffusers/src/diffusers/models/lora.py:111
↓ 82 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:13
↓ 80 callersFunctionload_numpy
(arry: Union[str, np.ndarray], local_path: Optional[str] = None)
diffusers/src/diffusers/utils/testing_utils.py:434
↓ 79 callersFunctionload_dataset
(args)
diffusers/examples/research_projects/pytorch_xla/train_text_to_image_xla.py:434
↓ 79 callersMethodstep
(self, parameters)
diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/textual_inversion.py:290
↓ 77 callersFunctionis_accelerate_available
()
diffusers/src/diffusers/utils/import_utils.py:391
↓ 77 callersFunctionis_compiled_module
Check whether the module was compiled with torch.compile()
diffusers/src/diffusers/utils/torch_utils.py:86
↓ 77 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
↓ 77 callersMethodprogress_bar
(self, iterable=None, total=None)
diffusers/src/diffusers/pipelines/pipeline_utils.py:1594
↓ 77 callersFunctionunet
(hor)
diffusers/scripts/convert_models_diffuser_to_diffusers.py:15
↓ 73 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:37
↓ 72 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
↓ 72 callersFunctionget_objects_from_module
Returns a dict of object names and values in a module, while skipping private/internal objects Args: module (ModuleType):
diffusers/src/diffusers/utils/import_utils.py:763
↓ 70 callersFunctioncheck_min_version
(min_version)
diffusers/src/diffusers/utils/__init__.py:124
↓ 70 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
↓ 68 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:1006
↓ 65 callersMethodadd_noise
( self, original_samples: torch.Tensor, noise: torch.Tensor, timesteps: torch.
diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_img2img.py:267
↓ 65 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:157
↓ 64 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:1075
↓ 63 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
↓ 61 callersMethod_set_pag_attn_processor
r""" Set the attention processor for the PAG layers.
diffusers/src/diffusers/pipelines/pag/pag_utils.py:36
↓ 61 callersMethodget_input_embeddings
(self)
diffusers/src/diffusers/pipelines/kolors/text_encoder.py:812
next →1–100 of 13,352, ranked by callers