MCPcopy Create free account

hub / github.com/cosmicman-cvpr2024/CosmicMan / functions

Functions6,241 in github.com/cosmicman-cvpr2024/CosmicMan

↓ 907 callersMethodfrom_pretrained
(cls, path, model_cls)
diffusers/src/diffusers/training_utils.py:117
↓ 699 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
↓ 528 callersMethodpop
(self, *args, **kwargs)
diffusers/src/diffusers/utils/outputs.py:79
↓ 516 callersMethodto
(self, device)
diffusers/tests/pipelines/stable_diffusion_safe/test_safe_diffusion.py:98
↓ 513 callersMethodset_progress_bar_config
(self, **kwargs)
diffusers/src/diffusers/pipelines/pipeline_utils.py:1471
↓ 464 callersFunctionrequires_backends
(obj, backends)
diffusers/src/diffusers/utils/import_utils.py:536
↓ 370 callersMethodto
(self, torch_device: Optional[Union[str, torch.device]] = None)
diffusers/examples/community/stable_unclip.py:180
↓ 341 callersMethodupdate
(self, *args, **kwargs)
diffusers/src/diffusers/utils/outputs.py:82
↓ 289 callersMethodto
(self, device)
diffusers/tests/pipelines/test_pipelines.py:960
↓ 248 callersMethodto
( self, torch_device: Optional[Union[str, torch.device]] = None, torch_dtype: Optional
diffusers/src/diffusers/pipelines/pipeline_utils.py:625
↓ 215 callersMethodfrom_config
(cls, *args, **kwargs)
diffusers/src/diffusers/utils/dummy_pt_objects.py:192
↓ 185 callersMethodset_timesteps
(self, num_inference_steps: int)
diffusers/examples/community/iadb.py:51
↓ 155 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:36
↓ 144 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_pndm.py:381
↓ 142 callersMethodstep
(self, parameters: Iterable[torch.nn.Parameter])
diffusers/src/diffusers/training_utils.py:161
↓ 137 callersMethodresize
Resize a PIL image. Both height and width are downscaled to the next integer multiple of `vae_scale_factor`.
diffusers/src/diffusers/image_processor.py:127
↓ 126 callersMethodregister_modules
(self, **kwargs)
diffusers/src/diffusers/pipelines/pipeline_utils.py:479
↓ 123 callersMethodprogress_bar
(self, iterable=None, total=None)
diffusers/src/diffusers/pipelines/pipeline_utils.py:1456
↓ 123 callersMethodsave_pretrained
(self, path)
diffusers/src/diffusers/training_utils.py:126
↓ 120 callersFunctiondeprecate
(*args, take_from: Optional[Union[Dict, Any]] = None, standard_warn=True, stacklevel=2)
diffusers/src/diffusers/utils/deprecation_utils.py:8
↓ 105 callersMethodset_timesteps
Sets the discrete timesteps used for the diffusion chain. Supporting function to be run before inference. Args: num_infe
diffusers/src/diffusers/schedulers/scheduling_pndm.py:170
↓ 97 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:262
↓ 97 callersMethodregister_to_config
(self, **kwargs)
diffusers/src/diffusers/configuration_utils.py:104
↓ 96 callersFunctionfloats_tensor
Creates a random float32 tensor
diffusers/src/diffusers/utils/testing_utils.py:128
↓ 96 callersMethodstep
Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion process from the learned m
diffusers/src/diffusers/schedulers/scheduling_pndm.py:228
↓ 94 callersMethoddecode
( self, latents, device, size: int = 64, ray_batch_size: int = 4096,
diffusers/src/diffusers/pipelines/shap_e/renderer.py:667
↓ 93 callersFunctionload_numpy
(arry: Union[str, np.ndarray], local_path: Optional[str] = None)
diffusers/src/diffusers/utils/testing_utils.py:228
↓ 91 callersMethodenable_attention_slicing
r""" Enable sliced attention computation. When this option is enabled, the attention module will split the input tensor in slices, to
diffusers/examples/community/text_inpainting.py:123
↓ 90 callersMethodload
(self)
diffusers/examples/community/stable_diffusion_tensorrt_inpaint.py:157
↓ 87 callersFunctionis_accelerate_available
()
diffusers/src/diffusers/utils/import_utils.py:353
↓ 85 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:269
↓ 84 callersMethodcheck_over_configs
(self, time_step=0, **config)
diffusers/tests/schedulers/test_schedulers.py:294
↓ 84 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:317
↓ 78 callersMethodnumpy_to_pil
Convert a NumPy image or a batch of images to a PIL image.
diffusers/src/diffusers/pipelines/pipeline_utils.py:1450
↓ 77 callersFunctioncallback
(obj)
diffusers/examples/community/tiled_upscaling.py:289
↓ 77 callersMethodpostprocess
( self, image: torch.FloatTensor, output_type: str = "pil", do_denormalize: Op
diffusers/src/diffusers/image_processor.py:215
↓ 74 callersMethodpipeline_class
(self)
diffusers/tests/pipelines/test_pipelines_common.py:239
↓ 73 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:581
↓ 73 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:223
↓ 70 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.py:473
↓ 66 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:870
↓ 61 callersMethodhead_to_batch_dim
(self, tensor, out_dim=3)
diffusers/src/diffusers/models/attention_processor.py:338
↓ 61 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
↓ 61 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:211
↓ 59 callersMethodsample
(self, generator: Optional[torch.Generator] = None)
diffusers/src/diffusers/models/vae.py:410
↓ 58 callersFunctionis_accelerate_version
Args: Compares the current Accelerate version to a given reference with an operation. operation (`str`): A string represe
diffusers/src/diffusers/utils/import_utils.py:626
↓ 58 callersMethodnumpy_to_pil
Convert a numpy image or a batch of images to a PIL image.
diffusers/src/diffusers/image_processor.py:59
↓ 56 callersMethoddummy_model
(self)
diffusers/tests/schedulers/test_schedulers.py:282
↓ 56 callersFunctionis_torch_available
()
diffusers/src/diffusers/utils/import_utils.py:305
↓ 53 callersMethodset_attn_processor
r""" Sets the attention processor to use to compute attention. Parameters: processor (`dict` of `AttentionProcessor` or o
diffusers/src/diffusers/models/controlnet.py:513
↓ 50 callersFunctionis_transformers_available
()
diffusers/src/diffusers/utils/import_utils.py:321
↓ 48 callersMethodadd_noise
( self, original_samples: torch.FloatTensor, noise: torch.FloatTensor, alpha:
diffusers/examples/community/iadb.py:54
↓ 48 callersMethoddevice
r""" Returns: `torch.device`: The torch device on which the pipeline is located.
diffusers/src/diffusers/pipelines/pipeline_utils.py:701
↓ 48 callersMethodget_input_embeddings
(self)
diffusers/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py:558
↓ 47 callersMethod_get_variance
(self, t, predicted_variance=None, variance_type=None)
diffusers/src/diffusers/schedulers/scheduling_ddpm.py:284
↓ 43 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.py:42
↓ 42 callersMethodencode
(self, img)
diffusers/examples/community/magic_mix.py:33
↓ 41 callersMethodencode
(self, token_ids)
diffusers/src/diffusers/pipelines/spectrogram_diffusion/midi_utils.py:127
↓ 41 callersFunctiontext_encoder
()
diffusers/scripts/convert_kakao_brain_unclip_to_diffusers.py:919
↓ 40 callersMethodadd_noise
( self, original_samples: torch.FloatTensor, noise: torch.FloatTensor, timeste
diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_img2img.py:293
↓ 40 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:139
↓ 38 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:271
↓ 37 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:241
↓ 36 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:133
↓ 35 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:173
↓ 31 callersFunctionunet
(hor)
diffusers/scripts/convert_models_diffuser_to_diffusers.py:15
↓ 30 callersMethoddecode
(self, latent)
diffusers/examples/community/magic_mix.py:40
↓ 30 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/deepfloyd_if/pipeline_if.py:147
↓ 30 callersMethodpreprocess
Preprocess the image input. Accepted formats are PIL images, NumPy arrays or PyTorch tensors.
diffusers/src/diffusers/image_processor.py:147
↓ 30 callersMethodto
(self, device)
diffusers/tests/pipelines/altdiffusion/test_alt_diffusion_img2img.py:108
↓ 29 callersMethoddisable_slicing
r""" Disable sliced VAE decoding. If `enable_slicing` was previously enabled, this method will go back to computing decoding in one st
diffusers/src/diffusers/models/autoencoder_kl.py:158
↓ 29 callersMethodenable_sequential_cpu_offload
r""" Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet, text_encoder, vae and safety
diffusers/examples/community/text_inpainting.py:150
↓ 29 callersMethodenable_slicing
r""" Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to compute decoding in sev
diffusers/src/diffusers/models/autoencoder_kl.py:151
↓ 29 callersFunctionprepare_mask_and_masked_image
Prepares a pair (image, mask) to be consumed by the Stable Diffusion pipeline. This means that those inputs will be converted to ``torch.Tens
diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py:39
↓ 29 callersMethodstep
(self, parameters)
diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/textual_inversion.py:289
↓ 28 callersMethod__init__
( self, in_channels: int, prev_output_channel: int, out_channels: int,
diffusers/src/diffusers/models/unet_2d_blocks.py:2637
↓ 27 callersMethod_test_inference_batch_single_identical
( self, batch_size=3, test_max_difference=None, test_mean_pixel_difference=Non
diffusers/tests/pipelines/test_pipelines_common.py:425
↓ 27 callersFunctioncheck_min_version
(min_version)
diffusers/src/diffusers/utils/__init__.py:112
↓ 27 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:16
↓ 26 callersFunctionassert_mean_pixel_difference
(image, expected_image, expected_max_diff=10)
diffusers/tests/pipelines/test_pipelines_common.py:779
↓ 25 callersFunctionassert_param_count
(model_1, model_2)
diffusers/scripts/convert_if.py:1183
↓ 25 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:111
↓ 25 callersMethodget_velocity
( self, sample: torch.FloatTensor, noise: torch.FloatTensor, timesteps: torch.IntTensor )
diffusers/src/diffusers/schedulers/scheduling_ddpm.py:477
↓ 25 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:600
↓ 25 callersMethodset_default_attn_processor
Disables custom attention processors and sets the default attention implementation.
diffusers/src/diffusers/models/controlnet.py:548
↓ 25 callersMethodto_tuple
Convert self to a tuple containing all the attributes/keys that are not `None`.
diffusers/src/diffusers/utils/outputs.py:104
↓ 25 callersFunctiontorch_all_close
(a, b, *args, **kwargs)
diffusers/src/diffusers/utils/testing_utils.py:64
↓ 24 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:644
↓ 24 callersMethodcreate_state
(self, common: Optional[CommonSchedulerState] = None)
diffusers/src/diffusers/schedulers/scheduling_pndm_flax.py:143
↓ 24 callersMethodget_dummy_inputs
(self, device, seed=0)
diffusers/tests/pipelines/test_pipelines_common.py:251
↓ 24 callersMethodset_attention_slice
r""" Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor in slices to comp
diffusers/src/diffusers/models/controlnet.py:555
↓ 23 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:282
↓ 23 callersFunctionis_wandb_available
()
diffusers/src/diffusers/utils/import_utils.py:365
↓ 23 callersFunctionis_xformers_available
()
diffusers/src/diffusers/utils/import_utils.py:349
↓ 23 callersMethodprepare_init_args_and_inputs_for_common
(self)
diffusers/tests/models/test_models_unet_2d_condition.py:148
↓ 22 callersMethodencode
(self, text, *args, vector_shuffle=False, prop_tokens_to_load=1.0, **kwargs)
diffusers/examples/research_projects/mulit_token_textual_inversion/multi_token_clip.py:96
↓ 22 callersFunctionis_safetensors_available
()
diffusers/src/diffusers/utils/import_utils.py:309
↓ 22 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:255
↓ 22 callersMethodpop
(self, *args, **kwargs)
diffusers/src/diffusers/configuration_utils.py:65
↓ 21 callersMethodprepare_attention_mask
(self, attention_mask, target_length, batch_size=None, out_dim=3)
diffusers/src/diffusers/models/attention_processor.py:383
next →1–100 of 6,241, ranked by callers