MCPcopy Create free account

hub / github.com/LetterLiGo/SafeGen_CCS2024 / functions

Functions7,383 in github.com/LetterLiGo/SafeGen_CCS2024

↓ 23 callersMethodsave_lora_weights
r""" Save the LoRA parameters corresponding to the UNet and text encoder. Arguments: save_directory (`str` or `os.PathLik
src/diffusers/loaders/lora.py:776
↓ 23 callersMethodunload_lora_weights
Unloads the LoRA parameters. Examples: ```python >>> # Assuming `pipeline` is already loaded with the LoRA paramete
src/diffusers/loaders/lora.py:867
↓ 22 callersMethoddownload
r""" Download and cache a PyTorch diffusion pipeline from pretrained pipeline weights. Parameters: pretrained_model_name
src/diffusers/pipelines/pipeline_utils.py:1532
↓ 22 callersMethodenable_xformers_memory_efficient_attention
r""" Enable memory efficient attention from [xFormers](https://facebookresearch.github.io/xformers/). When this option is enabled, yo
src/diffusers/models/modeling_utils.py:265
↓ 22 callersMethodload_textual_inversion
r""" Load Textual Inversion embeddings into the text encoder of [`StableDiffusionPipeline`] (both 🤗 Diffusers and Automatic1111 format
src/diffusers/loaders/textual_inversion.py:270
↓ 21 callersMethoddecode
( self, h: torch.FloatTensor, force_not_quantize: bool = False, return_dict: bool = True )
src/diffusers/models/vq_model.py:135
↓ 21 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl.py:139
↓ 21 callersMethodget_input_embeddings
(self)
src/diffusers/pipelines/blip_diffusion/modeling_blip2.py:421
↓ 21 callersFunctionis_onnx_available
()
src/diffusers/utils/import_utils.py:312
↓ 21 callersMethodprepare_attention_mask
r""" Prepare the attention mask for the attention computation. Args: attention_mask (`torch.Tensor`): The
src/diffusers/models/attention_processor.py:619
↓ 20 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py:170
↓ 20 callersMethodpil_to_numpy
Convert a PIL image or a list of PIL images to NumPy arrays.
src/diffusers/image_processor.py:107
↓ 20 callersMethodtest_output
(self)
tests/models/test_unet_2d_blocks.py:208
↓ 19 callersMethodget_dummy_components
(self, scheduler_cls=None)
tests/lora/test_lora_layers_peft.py:109
↓ 19 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_video_diffusion/test_stable_video_diffusion.py:123
↓ 19 callersMethodnorm_encoder_hidden_states
r""" Normalize the encoder hidden states. Requires `self.norm_cross` to be specified when constructing the `Attention` class.
src/diffusers/models/attention_processor.py:666
↓ 19 callersMethodprepare_init_args_and_inputs_for_common
(self)
tests/models/test_models_unet_2d_condition.py:173
↓ 19 callersFunctionto_np
(tensor)
tests/pipelines/stable_video_diffusion/test_stable_video_diffusion.py:37
↓ 18 callersMethod__init__
(self, num_channels: int, flip_sin_to_cos: bool, downscale_freq_shift: float)
src/diffusers/models/embeddings.py:239
↓ 18 callersMethodencode
(self, x: torch.FloatTensor, return_dict: bool = True)
src/diffusers/models/vq_model.py:125
↓ 18 callersMethodget_dummy_components
(self, time_cond_proj_dim=None)
tests/pipelines/stable_diffusion/test_stable_diffusion.py:112
↓ 18 callersMethodget_dummy_inputs
(self, with_generator=True)
tests/lora/test_lora_layers_peft.py:163
↓ 18 callersMethodget_inputs
(self, device, generator_device="cpu", dtype=torch.float32, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion.py:672
↓ 18 callersMethodprepare_init_args_and_inputs_for_common
(self)
tests/models/test_models_vq.py:50
↓ 17 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
scripts/convert_svd_to_diffusers.py:117
↓ 17 callersMethodfrom_single_file
r""" Instantiate a [`DiffusionPipeline`] from pretrained pipeline weights saved in the `.ckpt` or `.safetensors` format. The pipeline
src/diffusers/loaders/single_file.py:55
↓ 17 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion.py:170
↓ 17 callersMethodstep_plms
Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with the linear multistep met
src/diffusers/schedulers/scheduling_pndm.py:321
↓ 17 callersMethodstep_prk
Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with the Runge-Kutta method.
src/diffusers/schedulers/scheduling_pndm.py:261
↓ 16 callersMethod__init__
(self, in_channels: int, out_channels: int, mid_channels: Optional[int] = None)
src/diffusers/models/unet_1d_blocks.py:562
↓ 16 callersMethod__init__
( self, in_channels: int, prev_output_channel: int, out_channels: int,
src/diffusers/models/unet_3d_blocks.py:828
↓ 16 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
scripts/convert_if.py:656
↓ 16 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
src/diffusers/models/attention_processor.py:532
↓ 16 callersMethodget_dummy_components
(self, skip_first_text_encoder=False, time_cond_proj_dim=None)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py:73
↓ 16 callersMethodget_dummy_input
( self, include_temb=True, include_res_hidden_states_tuple=False, include_enco
tests/models/test_unet_blocks_common.py:41
↓ 16 callersMethodinputs_dict
(self, seed=None)
tests/models/test_models_vae.py:356
↓ 16 callersFunctionis_transformers_version
Args: Compares the current Transformers version to a given reference with an operation. operation (`str`): A string repre
src/diffusers/utils/import_utils.py:595
↓ 16 callersMethodsample
(self, generator: Optional[torch.Generator] = None)
src/diffusers/models/vae.py:778
↓ 15 callersFunction_get_task_class
(mapping, pipeline_class_name, throw_error_if_not_exist: bool = True)
src/diffusers/pipelines/auto_pipeline.py:146
↓ 15 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py:352
↓ 15 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py:352
↓ 15 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
scripts/convert_ms_text_to_video_to_diffusers.py:24
↓ 15 callersMethodcheck_over_forward
(self, time_step=0, **forward_kwargs)
tests/schedulers/test_schedulers.py:369
↓ 15 callersMethodget_dummy_components
(self, time_cond_proj_dim=None)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl.py:67
↓ 15 callersFunctionis_invisible_watermark_available
()
src/diffusers/utils/import_utils.py:372
↓ 15 callersMethodset_adapters
( self, adapter_names: Union[List[str], str], adapter_weights: Optional[List[float]] =
src/diffusers/loaders/lora.py:1101
↓ 15 callersMethodunfuse_lora
r""" Reverses the effect of [`pipe.fuse_lora()`](https://huggingface.co/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraLoade
src/diffusers/loaders/lora.py:967
↓ 14 callersMethod__init__
( self, channels: int, use_conv: bool = False, use_conv_transpose: bool = Fals
src/diffusers/models/resnet.py:46
↓ 14 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py:351
↓ 14 callersFunctionadd_state_dict
(prefix, mod)
scripts/convert_consistency_decoder.py:1047
↓ 14 callersFunctionassign_to_checkpoint
( paths, checkpoint, old_checkpoint, attention_paths_to_split=None, additional_replacements=None, config=N
scripts/convert_ddpm_original_checkpoint_to_diffusers.py:56
↓ 14 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_img2img.py:177
↓ 14 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion_2/test_stable_diffusion_depth.py:163
↓ 14 callersMethodget_dummy_inputs_by_type
(self, device, seed=0, input_image_type="pt", output_type="np")
tests/pipelines/test_pipelines_common.py:82
↓ 14 callersFunctionget_timestep_embedding
This matches the implementation in Denoising Diffusion Probabilistic Models: Create sinusoidal timestep embeddings. :param timesteps: a 1-D
src/diffusers/models/embeddings.py:26
↓ 14 callersFunctionis_bs4_available
()
src/diffusers/utils/import_utils.py:364
↓ 14 callersFunctionis_ftfy_available
()
src/diffusers/utils/import_utils.py:360
↓ 14 callersFunctionis_safetensors_compatible
Checking for safetensors compatibility: - By default, all models are saved with the default pytorch serialization, so we use the list of defa
src/diffusers/pipelines/pipeline_utils.py:137
↓ 13 callersFunction_get_library_root_logger
()
src/diffusers/utils/logging.py:73
↓ 13 callersMethod_test_save_load_optional_components
(self)
tests/pipelines/deepfloyd_if/__init__.py:152
↓ 13 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
scripts/convert_original_audioldm2_to_diffusers.py:155
↓ 13 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
scripts/convert_versatile_diffusion_to_diffusers.py:195
↓ 13 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
scripts/convert_original_audioldm_to_diffusers.py:150
↓ 13 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
scripts/convert_zero123_to_diffusers.py:136
↓ 13 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
scripts/convert_original_musicldm_to_diffusers.py:150
↓ 13 callersMethodcheck_over_configs
(self, time_step=0, **config)
tests/schedulers/test_scheduler_dpm_multi.py:40
↓ 13 callersMethodfull_loop
(self, scheduler=None, **config)
tests/schedulers/test_scheduler_unipc.py:90
↓ 13 callersMethodget_attention_scores
r""" Compute the attention scores. Args: query (`torch.Tensor`): The query tensor. key (`torch.Tensor`): The
src/diffusers/models/attention_processor.py:572
↓ 13 callersMethodget_dummy_components
(self)
tests/lora/test_lora_layers_old_backend.py:195
↓ 13 callersMethodget_dummy_components
(self)
tests/lora/test_lora_layers_old_backend.py:802
↓ 13 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/text_to_video_synthesis/test_text_to_video_zero_sdxl.py:134
↓ 13 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/controlnet/test_controlnet_sdxl.py:155
↓ 13 callersFunctionis_compiled_module
Check whether the module was compiled with torch.compile()
src/diffusers/utils/torch_utils.py:85
↓ 13 callersMethodto
(self, device)
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint_legacy.py:161
↓ 12 callersMethod_maybe_convert_prompt
r""" Maybe convert a prompt into a "multi vector"-compatible prompt. If the prompt includes a token that corresponds to a multi-vector
src/diffusers/loaders/textual_inversion.py:149
↓ 12 callersMethodcheck_over_configs
(self, time_step=0, **config)
tests/schedulers/test_scheduler_dpm_multi_inverse.py:34
↓ 12 callersMethodget_dummy_components
(self)
tests/pipelines/stable_video_diffusion/test_stable_video_diffusion.py:57
↓ 12 callersMethodget_dummy_inputs
(self, device, seed=0, img_res=64, output_pil=True)
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py:160
↓ 12 callersMethodget_dummy_inputs_with_latents
(self, device, seed=0)
tests/pipelines/unidiffuser/test_unidiffuser.py:181
↓ 12 callersMethodget_inputs
(self, device, generator_device="cpu", dtype=torch.float32, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py:504
↓ 12 callersMethodget_processor
r""" Get the attention processor in use. Args: return_deprecated_lora (`bool`, *optional*, defaults to `False`):
src/diffusers/models/attention_processor.py:408
↓ 12 callersFunctionrenew_resnet_paths
Updates paths inside resnets to the new naming scheme (local renaming)
src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py:79
↓ 12 callersFunctionrenew_resnet_paths
Updates paths inside resnets to the new naming scheme (local renaming)
scripts/convert_if.py:556
↓ 12 callersFunctionrenew_vae_resnet_paths
Updates paths inside resnets to the new naming scheme (local renaming)
src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py:101
↓ 12 callersFunctionunet
(hor)
scripts/convert_models_diffuser_to_diffusers.py:15
↓ 11 callersMethod__init__
(self, positive_len, out_dim, feature_type, fourier_freqs=8)
src/diffusers/pipelines/versatile_diffusion/modeling_text_unet.py:191
↓ 11 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
src/diffusers/schedulers/scheduling_deis_multistep.py:317
↓ 11 callersMethodcheck_over_configs
(self, time_step=0, **config)
tests/schedulers/test_scheduler_dpm_single.py:38
↓ 11 callersMethoddevice
r""" Returns: `torch.device`: The torch device on which the pipeline is located.
src/diffusers/pipelines/pipeline_utils.py:882
↓ 11 callersMethodget_dummy_components
(self, skip_first_text_encoder=False, time_cond_proj_dim=None)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_img2img.py:69
↓ 11 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/controlnet/test_controlnet_sdxl_img2img.py:142
↓ 11 callersMethodget_encoder_hidden_states
(self, seed=0, shape=(4, 77, 768), fp16=False)
tests/models/test_models_unet_2d_condition.py:833
↓ 11 callersMethodget_latents
(self, seed=0, shape=(4, 4, 64, 64), fp16=False)
tests/models/test_models_unet_2d_condition.py:739
↓ 11 callersMethodget_scheduler_config
(self)
tests/schedulers/test_schedulers.py:297
↓ 11 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_lcm.py:16
↓ 11 callersMethodget_unet_model
(self, fp16=False, model_id="CompVis/stable-diffusion-v1-4")
tests/models/test_models_unet_2d_condition.py:744
↓ 11 callersMethodnumpy_to_pil
Convert a numpy image or a batch of images to a PIL image.
src/diffusers/image_processor.py:91
↓ 11 callersMethodprogress_bar
(self, iterable=None, total=None)
src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py:192
↓ 11 callersMethodset_attention_slice
r""" Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor in slices to comp
src/diffusers/models/controlnet.py:590
↓ 11 callersMethodsort
(a, b)
src/diffusers/schedulers/scheduling_dpmsolver_sde.py:45
← previousnext →101–200 of 7,383, ranked by callers