MCPcopy Create free account

hub / github.com/TencentARC/BrushNet / functions

Functions9,976 in github.com/TencentARC/BrushNet

↓ 39 callersMethodget_velocity
( self, sample: torch.FloatTensor, noise: torch.FloatTensor, timesteps: torch.IntTensor )
examples/community/scheduling_ufogen.py:488
↓ 39 callersFunctiontorch_all_close
(a, b, *args, **kwargs)
src/diffusers/utils/testing_utils.py:94
↓ 38 callersMethod_get_variance
(self, timestep, prev_timestep)
src/diffusers/schedulers/scheduling_tcd.py:319
↓ 38 callersMethodfrom_pipe
r""" Instantiates a text-to-image Pytorch diffusion pipeline from another instantiated diffusion pipeline class. The from_pipe() meth
src/diffusers/pipelines/auto_pipeline.py:338
↓ 38 callersMethodto_tuple
Convert self to a tuple containing all the attributes/keys that are not `None`.
src/diffusers/utils/outputs.py:133
↓ 37 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
src/diffusers/utils/state_dict_utils.py:193
↓ 35 callersMethod_test_attention_slicing_forward_pass
( self, test_max_difference=True, test_mean_pixel_difference=True, expected_max_diff=1e-3 )
tests/pipelines/test_pipelines_common.py:1015
↓ 35 callersMethodget_dummy_components
(self)
tests/pipelines/test_pipelines_common.py:587
↓ 35 callersFunctionis_flax_available
()
src/diffusers/utils/import_utils.py:311
↓ 35 callersMethodset_processor
r""" Set the attention processor to use. Args: processor (`AttnProcessor`): The attention processor to us
src/diffusers/models/attention_processor.py:380
↓ 34 callersMethodprogress_bar
(self, iterable=None, total=None)
src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_combined.py:141
↓ 32 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
src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py:168
↓ 32 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:158
↓ 32 callersMethodpreprocess
Preprocess the image input. Args: image (`pipeline_image_input`): The image input, accepted formats are
src/diffusers/image_processor.py:446
↓ 31 callersMethodencode
(self, text, *args, vector_shuffle=False, prop_tokens_to_load=1.0, **kwargs)
examples/research_projects/multi_token_textual_inversion/multi_token_clip.py:96
↓ 31 callersMethodprepare_attention_mask
r""" Prepare the attention mask for the attention computation. Args: attention_mask (`torch.Tensor`): The
src/diffusers/models/attention_processor.py:624
↓ 31 callersMethodto
(self, device)
examples/consistency_distillation/train_lcm_distill_sdxl_wds.py:434
↓ 29 callersFunctionis_invisible_watermark_available
()
src/diffusers/utils/import_utils.py:383
↓ 29 callersMethodto
(self, device)
examples/consistency_distillation/train_lcm_distill_lora_sdxl_wds.py:412
↓ 28 callersMethodload_config
r""" Load a model or scheduler configuration. Parameters: pretrained_model_name_or_path (`str` or `os.PathLike`, *optiona
src/diffusers/configuration_utils.py:287
↓ 28 callersMethodmode
(self)
src/diffusers/models/vae_flax.py:722
↓ 28 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
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py:40
↓ 28 callersMethodset_attn_processor
r""" Sets the attention processor to use to compute attention. Parameters: processor (`dict` of `AttentionProcessor` or o
src/diffusers/models/brushnet.py:558
↓ 27 callersMethod__init__
( self, in_channels: int, prev_output_channel: int, out_channels: int,
src/diffusers/models/unets/unet_2d_blocks.py:2643
↓ 27 callersMethod_test_xformers_attention_forwardGenerator_pass
( self, test_max_difference=True, test_mean_pixel_difference=True, expected_max_diff=1e-4 )
tests/pipelines/test_pipelines_common.py:1111
↓ 27 callersFunctionassert_mean_pixel_difference
(image, expected_image, expected_max_diff=10)
tests/pipelines/test_pipelines_common.py:1610
↓ 27 callersMethodcopy_to
Copy current averaged parameters into given collection of parameters. Args: parameters: Iterable of `torch.nn.Parameter`;
examples/research_projects/intel_opts/textual_inversion_dfq/textual_inversion.py:305
↓ 27 callersMethoddecode
(self, encodings_and_masks, input_tokens, noise_time)
src/diffusers/pipelines/deprecated/spectrogram_diffusion/pipeline_spectrogram_diffusion.py:114
↓ 27 callersFunctionget_activation
Helper function to get activation function from string. Args: act_fn (str): Name of activation function. Returns: nn.Module:
src/diffusers/models/activations.py:33
↓ 27 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:671
↓ 26 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:266
↓ 26 callersMethodpop
(self, *args, **kwargs)
src/diffusers/configuration_utils.py:69
↓ 26 callersMethodpreprocess
(self, image, scale, resample)
examples/custom_diffusion/train_custom_diffusion.py:238
↓ 26 callersMethodsave_lora_weights
( self, save_directory: Union[str, os.PathLike], unet_lora_layers: Dict[str, Union[tor
examples/community/pipeline_demofusion_sdxl.py:1342
↓ 25 callersFunctionassert_param_count
(model_1, model_2)
scripts/convert_if.py:1176
↓ 25 callersFunctionto_np
(tensor)
tests/pipelines/test_pipelines_common.py:56
↓ 24 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:533
↓ 24 callersMethodcreate_state
(self, common: Optional[CommonSchedulerState] = None)
src/diffusers/schedulers/scheduling_pndm_flax.py:143
↓ 23 callersMethodfrom_pretrained
r""" Instantiate a pretrained MultiControlNet model from multiple pre-trained controlnet models. The model is set in evaluation mode
src/diffusers/pipelines/controlnet/multicontrolnet.py:118
↓ 23 callersMethodoptimize
(self, onnx_graph)
examples/community/stable_diffusion_tensorrt_inpaint.py:451
↓ 23 callersMethodpil_to_numpy
Convert a PIL image or a list of PIL images to NumPy arrays.
src/diffusers/image_processor.py:102
↓ 23 callersMethodto
(self, device)
examples/consistency_distillation/train_lcm_distill_lora_sd_wds.py:424
↓ 22 callersMethoddecode
( self, h: torch.FloatTensor, force_not_quantize: bool = False, return_dict: bool = True, shape=None
src/diffusers/models/vq_model.py:140
↓ 22 callersMethoddownload
r""" Download and cache a PyTorch diffusion pipeline from pretrained pipeline weights. Parameters: pretrained_model_name
src/diffusers/pipelines/pipeline_utils.py:1086
↓ 22 callersMethodto
(self, device)
examples/consistency_distillation/train_lcm_distill_lora_sdxl.py:92
↓ 21 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:577
↓ 21 callersMethodget_dummy_components
(self, scheduler_cls=None)
tests/lora/test_lora_layers_peft.py:93
↓ 21 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py:172
↓ 21 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl.py:151
↓ 21 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_video_diffusion/test_stable_video_diffusion.py:125
↓ 20 callersMethod__init__
(self, num_channels: int, flip_sin_to_cos: bool, downscale_freq_shift: float)
src/diffusers/models/embeddings.py:241
↓ 20 callersMethodfuse_lora
r""" Fuses the LoRA parameters into the original parameters of the corresponding blocks. <Tip warning={true}> This is an exp
src/diffusers/loaders/lora.py:838
↓ 20 callersMethodget_dummy_components
(self, time_cond_proj_dim=None)
tests/pipelines/stable_diffusion/test_stable_diffusion.py:125
↓ 20 callersMethodget_dummy_inputs
(self, with_generator=True)
tests/lora/test_lora_layers_peft.py:149
↓ 20 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion.py:183
↓ 20 callersFunctionis_onnx_available
()
src/diffusers/utils/import_utils.py:327
↓ 20 callersFunctionload_or_create_model_card
Loads or creates a model card. Args: repo_id_or_path (`str`): The repo id (e.g., "runwayml/stable-diffusion-v1-5") or lo
src/diffusers/utils/hub_utils.py:96
↓ 20 callersFunctionpopulate_model_card
Populates the `model_card` with library name and optional tags.
src/diffusers/utils/hub_utils.py:165
↓ 20 callersMethodprepare_init_args_and_inputs_for_common
(self)
tests/models/unets/test_models_unet_2d_condition.py:266
↓ 20 callersMethodtest_output
(self)
tests/models/unets/test_unet_2d_blocks.py:208
↓ 19 callersMethodcrop
(self, im, new_width, new_height)
src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py:508
↓ 19 callersMethodload_ip_adapter
Parameters: pretrained_model_name_or_path_or_dict (`str` or `List[str]` or `os.PathLike` or `List[os.PathLike]` or `dict` or `Lis
src/diffusers/loaders/ip_adapter.py:50
↓ 19 callersMethodload_lora_weights
(self, pretrained_model_name_or_path_or_dict: Union[str, Dict[str, torch.Tensor]], **kwargs)
examples/community/pipeline_demofusion_sdxl.py:1284
↓ 19 callersMethodnormalize
Normalize an image array to [-1,1].
src/diffusers/image_processor.py:133
↓ 19 callersFunctionto_np
(tensor)
tests/pipelines/stable_video_diffusion/test_stable_video_diffusion.py:39
↓ 18 callersMethodapply_watermark
(self, images: List[PIL.Image.Image], sample_size=None)
src/diffusers/pipelines/deepfloyd_if/watermark.py:19
↓ 18 callersMethodget_dummy_inputs
(self, for_image_to_image=False, for_inpainting=False, for_sdxl=False, for_masks=False)
tests/pipelines/ip_adapters/test_ip_adapter_stable_diffusion.py:68
↓ 18 callersMethodget_inputs
(self, device, generator_device="cpu", dtype=torch.float32, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion.py:768
↓ 18 callersMethodprepare_init_args_and_inputs_for_common
(self)
tests/models/autoencoders/test_models_vq.py:55
↓ 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 callersMethodcheck_over_forward
(self, time_step=0, **forward_kwargs)
tests/schedulers/test_schedulers.py:431
↓ 17 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:75
↓ 17 callersMethodset_adapters
( self, adapter_names: Union[List[str], str], adapter_weights: Optional[List[float]] =
src/diffusers/loaders/lora.py:1033
↓ 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
↓ 17 callersFunctionto_np
(tensor)
tests/pipelines/pia/test_pia.py:23
↓ 17 callersMethodwalk
Walks through a series of prompts and seeds, interpolating between them and saving the results to disk. Args: prompts (`
examples/community/interpolate_stable_diffusion.py:399
↓ 16 callersMethod__init__
(self, in_channels: int, out_channels: int, mid_channels: Optional[int] = None)
src/diffusers/models/unets/unet_1d_blocks.py:562
↓ 16 callersMethod__init__
( self, in_channels: int, prev_output_channel: int, out_channels: int,
src/diffusers/models/unets/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:649
↓ 16 callersMethodget_dummy_components
(self, time_cond_proj_dim=None)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl.py:79
↓ 16 callersMethodget_dummy_input
( self, include_temb=True, include_res_hidden_states_tuple=False, include_enco
tests/models/unets/test_unet_blocks_common.py:46
↓ 16 callersMethodinputs_dict
(self, seed=None)
tests/models/autoencoders/test_models_vae.py:363
↓ 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:603
↓ 16 callersFunctiontrain_transforms
(img)
examples/kandinsky2_2/text_to_image/train_text_to_image_decoder.py:647
↓ 15 callersFunction_get_task_class
(mapping, pipeline_class_name, throw_error_if_not_exist: bool = True)
src/diffusers/pipelines/auto_pipeline.py:148
↓ 15 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py:358
↓ 15 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py:444
↓ 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_i2vgen_to_diffusers.py:28
↓ 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 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_img2img.py:189
↓ 15 callersMethodget_image_encoder
(self, repo_id, subfolder)
tests/pipelines/ip_adapters/test_ip_adapter_stable_diffusion.py:58
↓ 15 callersMethodget_processor
r""" Get the attention processor in use. Args: return_deprecated_lora (`bool`, *optional*, defaults to `False`):
src/diffusers/models/attention_processor.py:400
↓ 15 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:27
↓ 15 callersMethodprepare_inputs
(self, prompt: Union[str, List[str]])
src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py:167
↓ 15 callersMethodstore
r""" Args: Save the current parameters for restoring later. parameters: Iterable of `torch.nn.Parameter`; the parameters t
src/diffusers/training_utils.py:381
↓ 15 callersMethodunload_lora_weights
Unloads the LoRA parameters. Examples: ```python >>> # Assuming `pipeline` is already loaded with the LoRA paramete
src/diffusers/loaders/lora.py:806
↓ 15 callersFunctionunwrap_model
(model)
examples/text_to_image/train_text_to_image_lora_sdxl.py:649
↓ 14 callersMethod_load_ip_adapter_weights
(self, state_dicts, low_cpu_mem_usage=False)
src/diffusers/loaders/unet.py:877
↓ 14 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py:399
← previousnext →101–200 of 9,976, ranked by callers