MCPcopy Create free account

hub / github.com/TencentARC/BrushNet / functions

Functions9,976 in github.com/TencentARC/BrushNet

↓ 4 callersFunctionshave_segments
Removes segments. Positive values shave the first segments, negative shave the last segments.
scripts/convert_ldm_original_checkpoint_to_diffusers.py:25
↓ 4 callersMethodto
(self, torch_device: Optional[Union[str, torch.device]] = None, silence_dtype_warnings: bool = False)
examples/community/stable_diffusion_tensorrt_txt2img.py:718
↓ 4 callersFunctiontokenize_prompt
(tokenizer, prompt)
examples/amused/train_amused.py:402
↓ 4 callersFunctiontokenize_prompt
(tokenizer, prompt, add_special_tokens=False)
examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py:1000
↓ 4 callersFunctiontranslate_prompt
helper function to translate prompt to English
examples/community/multilingual_stable_diffusion.py:41
↓ 4 callersFunctionupdate_mapping_from_spec
(device_fn_dict: Dict[str, Callable], attribute_name: str)
src/diffusers/utils/testing_utils.py:927
↓ 4 callersFunctionupdate_vae_resnet_ldm_to_diffusers
(keys, new_checkpoint, checkpoint, mapping)
src/diffusers/loaders/single_file_utils.py:899
↓ 4 callersFunctionvqvae_attention_to_diffusers_checkpoint
(checkpoint, *, diffusers_attention_prefix, attention_prefix)
scripts/convert_vq_diffusion_to_diffusers.py:433
↓ 4 callersFunctionvqvae_resnet_to_diffusers_checkpoint
(resnet, checkpoint, *, diffusers_resnet_prefix, resnet_prefix)
scripts/convert_vq_diffusion_to_diffusers.py:406
↓ 4 callersMethodwrite_lora_layers
( state_dict: Dict[str, torch.Tensor], save_directory: str, is_main_process: bool,
src/diffusers/loaders/lora.py:773
↓ 3 callersMethod__call__
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`, *optional*):
examples/community/rerender_a_video.py:589
↓ 3 callersMethod__call__
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`): The
examples/community/lpw_stable_diffusion_onnx.py:654
↓ 3 callersMethod__call__
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str`): The prompt to guid
examples/community/lpw_stable_diffusion_xl.py:1365
↓ 3 callersMethod__call__
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`): The
examples/community/lpw_stable_diffusion.py:759
↓ 3 callersMethod__init__
Initialize an empty AttentionStore :param step_index: used to visualize only a specific step in the diffusion process
src/diffusers/pipelines/stable_diffusion_attend_and_excite/pipeline_stable_diffusion_attend_and_excite.py:122
↓ 3 callersMethod__init__
( self, channels: int, use_conv: bool = False, out_channels: Optional[int] = N
src/diffusers/models/downsampling.py:43
↓ 3 callersMethod__init__
( self, channels: int, use_conv: bool = False, use_conv_transpose: bool = Fals
src/diffusers/models/upsampling.py:42
↓ 3 callersMethod__init__
(self, model, device, max_batch_size, embedding_dim)
examples/community/stable_diffusion_tensorrt_txt2img.py:538
↓ 3 callersMethod__init__
( self, hidden_size, cross_attention_dim=None, rank=4, network_alpha=N
examples/community/ip_adapter_face_id.py:68
↓ 3 callersMethod__init__
(self, num_tok, dim, dim_out, mult=2)
examples/community/gluegen.py:30
↓ 3 callersMethod__init__
( self, dim=1024, depth=8, dim_head=64, heads=16, num_queries=
examples/community/pipeline_stable_diffusion_xl_instantid.py:119
↓ 3 callersMethod_aggregate_and_get_max_attention_per_token
Aggregates the attention for each token and computes the max activation value for each token to alter.
src/diffusers/pipelines/stable_diffusion_attend_and_excite/pipeline_stable_diffusion_attend_and_excite.py:623
↓ 3 callersMethod_alpha_cumprod
(self, t, device)
src/diffusers/schedulers/scheduling_ddpm_wuerstchen.py:118
↓ 3 callersMethod_apply_free_init
( self, latents: torch.Tensor, free_init_iteration: int, num_inference_steps:
src/diffusers/pipelines/free_init_utils.py:138
↓ 3 callersMethod_cast_floating_to
Helper method to cast floating-point values of given parameter `PyTree` to given `dtype`.
src/diffusers/models/modeling_flax_utils.py:71
↓ 3 callersFunction_chunked_feed_forward
( ff: nn.Module, hidden_states: torch.Tensor, chunk_dim: int, chunk_size: int, lora_scale: Optional[float]
src/diffusers/models/attention.py:29
↓ 3 callersMethod_combine_joint
r""" Combines a latent image img_vae of shape (B, C, H, W), a CLIP-embedded image img_clip of shape (B, L_img, clip_img_dim), and a te
src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py:817
↓ 3 callersMethod_compute_loss
Computes the attend-and-excite loss using the maximum attention value for each token.
src/diffusers/pipelines/stable_diffusion_attend_and_excite/pipeline_stable_diffusion_attend_and_excite.py:638
↓ 3 callersFunction_device_agnostic_dispatch
(device: str, dispatch_table: Dict[str, Callable], *args, **kwargs)
src/diffusers/utils/testing_utils.py:885
↓ 3 callersMethod_encode_vae_image
(self, image: torch.Tensor, generator: torch.Generator)
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py:840
↓ 3 callersMethod_get_dummy_components
(self)
tests/pipelines/deepfloyd_if/__init__.py:19
↓ 3 callersMethod_get_superresolution_dummy_components
(self)
tests/pipelines/deepfloyd_if/__init__.py:76
↓ 3 callersMethod_get_variance
(self, t, predicted_variance=None, variance_type=None)
src/diffusers/schedulers/scheduling_ddpm.py:328
↓ 3 callersMethod_get_variance
(self, t, predicted_variance=None, variance_type=None)
src/diffusers/schedulers/scheduling_ddpm_parallel.py:339
↓ 3 callersMethod_get_variance
(self, timestep, prev_timestep)
examples/community/latent_consistency_txt2img.py:514
↓ 3 callersMethod_init_step_index
(self, timestep)
src/diffusers/schedulers/scheduling_lcm.py:271
↓ 3 callersMethod_optionally_disable_offloading
Optionally removes offloading in case the pipeline has been already sequentially offloaded to CPU. Args: _pipeline (`Dif
src/diffusers/loaders/lora.py:349
↓ 3 callersMethod_split
r""" Splits a flattened embedding x of shape (B, C * H * W + clip_img_dim) into two tensors of shape (B, C, H, W) and (B, 1, clip_img_
src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py:773
↓ 3 callersMethod_split_joint
r""" Splits a flattened embedding x of shape (B, C * H * W + clip_img_dim + text_seq_len * text_dim] into (img_vae, img_clip, text) wh
src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py:798
↓ 3 callersFunction_unwrap_model
Unwraps a model.
src/diffusers/pipelines/pipeline_loading_utils.py:223
↓ 3 callersFunctionadain
(feat: torch.Tensor)
examples/community/pipeline_sdxl_style_aligned.py:160
↓ 3 callersFunctionattention_to_diffusers_checkpoint
(checkpoint, *, diffusers_attention_prefix, attention_prefix, num_head_channels)
scripts/convert_kandinsky_to_diffusers.py:777
↓ 3 callersFunctionattention_to_diffusers_checkpoint
(checkpoint, *, diffusers_attention_prefix, attention_prefix, num_head_channels)
scripts/convert_kakao_brain_unclip_to_diffusers.py:826
↓ 3 callersMethodbackward_loop
Perform backward process given list of time steps Args: latents: Latents at time timesteps[0].
src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py:837
↓ 3 callersMethodbackward_loop
Perform backward process given list of time steps. Args: latents: Latents at time timesteps[0].
src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py:375
↓ 3 callersMethodbatch_step_no_noise
Batched version of the `step` function, to be able to reverse the SDE for multiple samples/timesteps at once. Also, does not add any
src/diffusers/schedulers/scheduling_ddim_parallel.py:489
↓ 3 callersMethodbinarize
Create a mask. Args: image (`PIL.Image.Image`): The image input, should be a PIL image. Returns
src/diffusers/image_processor.py:386
↓ 3 callersMethodcheck_image
(self, image, prompt, prompt_embeds)
src/diffusers/pipelines/controlnet/pipeline_controlnet.py:741
↓ 3 callersMethodcheck_image
(self, image, prompt, prompt_embeds)
examples/research_projects/promptdiffusion/pipeline_prompt_diffusion.py:722
↓ 3 callersMethodcheck_inputs
( self, prompt, strength, callback_steps, negative_prompt=None,
src/diffusers/pipelines/stable_diffusion_diffedit/pipeline_stable_diffusion_diffedit.py:636
↓ 3 callersMethodcheck_over_forward
(self, time_step=0, **forward_kwargs)
tests/schedulers/test_scheduler_flax.py:440
↓ 3 callersFunctioncheck_size
(image, height, width)
examples/community/img2img_inpainting.py:38
↓ 3 callersFunctioncheckout_commit
Context manager that checks out a given commit when entered, but gets back to the reference it was at on exit. Args: repo (`git.Repo
utils/tests_fetcher.py:88
↓ 3 callersFunctioncheckpoint
(step=None)
examples/dreambooth/train_dreambooth_flax.py:629
↓ 3 callersFunctionclean_doc_toc
Cleans the table of content of the model documentation by removing duplicates and sorting models alphabetically.
utils/check_doc_toc.py:25
↓ 3 callersFunctioncompute_text_embeddings
(prompt, text_encoders, tokenizers)
examples/dreambooth/train_dreambooth_lora_sdxl.py:1424
↓ 3 callersFunctioncompute_text_embeddings
(prompt, text_encoders, tokenizers)
examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py:1638
↓ 3 callersFunctioncompute_text_embeddings
(prompt, text_encoders, tokenizers)
examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py:1466
↓ 3 callersFunctionconcat_first
(feat: torch.Tensor, dim: int = 2, scale: float = 1.0)
examples/community/pipeline_sdxl_style_aligned.py:149
↓ 3 callersFunctionconvert_all_state_dict_to_peft
r""" Attempts to first `convert_state_dict_to_peft`, and if it doesn't detect `lora_linear_layer` for a valid `DIFFUSERS` LoRA for example, at
src/diffusers/utils/state_dict_utils.py:248
↓ 3 callersFunctionconvert_attention
(checkpoint, new_checkpoint, old_prefix, new_prefix, attention_dim=None)
scripts/convert_consistency_to_diffusers.py:142
↓ 3 callersFunctionconvert_ldm_unet_checkpoint
Takes a state dict and a config, and returns a converted checkpoint.
examples/research_projects/promptdiffusion/convert_original_promptdiffusion_to_diffusers.py:390
↓ 3 callersFunctionconvert_state_dict_to_kohya
r""" Converts a `PEFT` state dict to `Kohya` format that can be used in AUTOMATIC1111, ComfyUI, SD.Next, InvokeAI, etc. The method only suppor
src/diffusers/utils/state_dict_utils.py:267
↓ 3 callersFunctionconvert_state_dict_to_peft
r""" Converts a state dict to the PEFT format The state dict can be from previous diffusers format (`OLD_DIFFUSERS`), or new diffusers format
src/diffusers/utils/state_dict_utils.py:166
↓ 3 callersFunctionconvert_uvit_block_to_diffusers_block
Maps the keys in a UniDiffuser transformer block (`Block`) to the keys in a diffusers transformer block (`UTransformerBlock`/`UniDiffuserBloc
scripts/convert_unidiffuser_to_diffusers.py:496
↓ 3 callersFunctioncreate_custom_diffusion_layers
(model, mock_weights: bool = True)
tests/models/unets/test_models_unet_2d_condition.py:193
↓ 3 callersFunctioncreate_text_encoder_from_open_clip_checkpoint
( config_name, checkpoint, prefix="cond_stage_model.model.", has_projection=False, local_f
src/diffusers/loaders/single_file_utils.py:1078
↓ 3 callersFunctioncreate_unet_diffusers_config
Creates a config for the diffusers based on the config of the LDM model.
examples/research_projects/promptdiffusion/convert_original_promptdiffusion_to_diffusers.py:237
↓ 3 callersFunctiondelete_adapter_layers
(model, adapter_name)
src/diffusers/utils/peft_utils.py:205
↓ 3 callersMethoddelete_adapters
Args: Deletes the LoRA layers of `adapter_name` for the unet and text-encoder(s). adapter_names (`Union[List[str], str]`)
src/diffusers/loaders/lora.py:1076
↓ 3 callersFunctiondetect_language
helper function to detect language(s) of prompt
examples/community/multilingual_stable_diffusion.py:26
↓ 3 callersMethoddisable_adapters
r""" Disable all adapters attached to the model and fallback to inference with the base model only. If you are not familiar with adap
src/diffusers/loaders/peft.py:122
↓ 3 callersMethoddisable_attention_slicing
r""" Disable sliced attention computation. If `enable_attention_slicing` was previously called, attention is computed in one step.
src/diffusers/pipelines/pipeline_utils.py:1635
↓ 3 callersMethoddisable_free_init
Disables the FreeInit mechanism if enabled.
src/diffusers/pipelines/free_init_utils.py:66
↓ 3 callersMethoddisable_tiling
r""" Disable tiled VAE decoding. If `enable_tiling` was previously enabled, this method will go back to computing decoding in one step
src/diffusers/models/autoencoders/autoencoder_kl.py:140
↓ 3 callersMethoddummy_model
(self)
tests/schedulers/test_scheduler_flax.py:66
↓ 3 callersMethodenable_free_init
Enables the FreeInit mechanism as in https://arxiv.org/abs/2312.07537. This implementation has been adapted from the [official repository](ht
src/diffusers/pipelines/free_init_utils.py:27
↓ 3 callersMethodenable_vae_tiling
r""" Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and en
src/diffusers/pipelines/pipeline_utils.py:1671
↓ 3 callersMethodencode
(self, prefix)
src/diffusers/pipelines/unidiffuser/modeling_text_decoder.py:166
↓ 3 callersMethodencode
Reverse the denoising step process to recover a noisy image from the generated image. Args: images (`List[PIL Image]`):
src/diffusers/pipelines/deprecated/audio_diffusion/pipeline_audio_diffusion.py:271
↓ 3 callersFunctionencode_prompt
(text_encoder, input_ids)
examples/amused/train_amused.py:412
↓ 3 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py:205
↓ 3 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_pix2pix_zero.py:406
↓ 3 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_cycle_diffusion.py:284
↓ 3 callersFunctionexpand_first
(feat: torch.Tensor, scale: float = 1.0)
examples/community/pipeline_sdxl_style_aligned.py:138
↓ 3 callersMethodextract_init_dict
(cls, config_dict, **kwargs)
src/diffusers/configuration_utils.py:456
↓ 3 callersFunctionfetch_ldm_config_and_checkpoint
( pretrained_model_link_or_path, class_name, original_config_file=None, resume_download=False,
src/diffusers/loaders/single_file_utils.py:221
↓ 3 callersFunctionfind_denominator
(number, start)
examples/research_projects/controlnetxs/controlnetxs.py:940
↓ 3 callersFunctionfreeze_params
(params)
examples/research_projects/intel_opts/textual_inversion/textual_inversion_bf16.py:358
↓ 3 callersMethodfull_loop
(self, **config)
tests/schedulers/test_scheduler_flax.py:361
↓ 3 callersMethodfull_loop
(self, **config)
tests/schedulers/test_scheduler_flax.py:767
↓ 3 callersFunctiongenerate_images
(pipeline, prompt="", guidance_scale=7.5, num_inference_steps=50, num_images_per_prompt=1, seed=42)
examples/research_projects/intel_opts/textual_inversion_dfq/textual_inversion.py:421
↓ 3 callersMethodgenerate_mask
r""" Generate a latent mask given a mask prompt, a target prompt, and an image. Args: image (`PIL.Image.Image`):
src/diffusers/pipelines/stable_diffusion_diffedit/pipeline_stable_diffusion_diffedit.py:830
↓ 3 callersFunctionget_2d_sincos_pos_embed
grid_size: int of the grid height and width return: pos_embed: [grid_size*grid_size, embed_dim] or [1+grid_size*grid_size, embed_dim] (w/ or
src/diffusers/models/embeddings.py:70
↓ 3 callersMethodget_active_adapters
Gets the list of the current active adapters. Example: ```python from diffusers import DiffusionPipeline p
src/diffusers/loaders/lora.py:1100
↓ 3 callersFunctionget_adapter_name
(model)
src/diffusers/utils/peft_utils.py:184
↓ 3 callersFunctionget_discretization_steps
Calculates the current discretization steps at global step k using the discretization curriculum N(k).
examples/research_projects/consistency_training/train_cm_ct_unconditional.py:91
↓ 3 callersMethodget_dummy_components
(self)
tests/pipelines/controlnet/test_controlnet.py:288
↓ 3 callersMethodget_dummy_components
(self)
tests/pipelines/stable_diffusion_ldm3d/test_stable_diffusion_ldm3d.py:45
↓ 3 callersMethodget_dummy_components
(self)
tests/pipelines/wuerstchen/test_wuerstchen_prior.py:128
← previousnext →701–800 of 9,976, ranked by callers