MCPcopy Create free account

hub / github.com/TencentARC/BrushNet / functions

Functions9,976 in github.com/TencentARC/BrushNet

↓ 9 callersFunctionto_np
(tensor)
tests/pipelines/animatediff/test_animatediff.py:24
↓ 9 callersFunctionto_np
(tensor)
tests/pipelines/animatediff/test_animatediff_video2video.py:24
↓ 9 callersFunctionunwrap_model
(model)
examples/dreambooth/train_dreambooth_lora_sdxl.py:1181
↓ 9 callersFunctionunwrap_model
(model)
examples/dreambooth/train_dreambooth_lora.py:929
↓ 8 callersMethod__init__
( self, in_channels: int = 3, channels: List[int] = [320, 640, 1280, 1280], nu
src/diffusers/models/adapter.py:245
↓ 8 callersMethod__init__
( self, in_channels: int = 4, time_embedding_dim: int = 1536, groups: int = 32
src/diffusers/models/unets/unet_kandinsky3.py:51
↓ 8 callersMethod_modify_inputs_for_ip_adapter_test
(self, inputs: Dict[str, Any])
tests/pipelines/test_pipelines_common.py:234
↓ 8 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
src/diffusers/schedulers/scheduling_sasolver.py:367
↓ 8 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
src/diffusers/schedulers/scheduling_unipc_multistep.py:353
↓ 8 callersFunctionapply_freeu
Applies the FreeU mechanism as introduced in https: //arxiv.org/abs/2309.11497. Adapted from the official code repository: https://github.com/Chen
src/diffusers/utils/torch_utils.py:123
↓ 8 callersFunctionbackend_manual_seed
(device: str, seed: int)
src/diffusers/utils/testing_utils.py:900
↓ 8 callersFunctionconvert_unet_state_dict_to_peft
r""" Converts a state dict from UNet format to diffusers format - i.e. by removing some keys
src/diffusers/utils/state_dict_utils.py:240
↓ 8 callersMethodcreate
( cls, common: CommonSchedulerState, final_alpha_cumprod: jnp.ndarray, init_no
src/diffusers/schedulers/scheduling_pndm_flax.py:53
↓ 8 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
examples/community/lpw_stable_diffusion_xl.py:657
↓ 8 callersMethodencode
(self, token_ids)
src/diffusers/pipelines/deprecated/spectrogram_diffusion/midi_utils.py:127
↓ 8 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.py:287
↓ 8 callersMethodfull_loop
(self, scheduler=None, **config)
tests/schedulers/test_scheduler_dpm_multi.py:103
↓ 8 callersMethodget_default_height_width
This function return the height and width that are downscaled to the next integer multiple of `vae_scale_factor`. Args:
src/diffusers/image_processor.py:403
↓ 8 callersFunctionget_down_block
( down_block_type: str, num_layers: int, in_channels: int, out_channels: int, temb_channel
src/diffusers/models/unets/unet_1d_blocks.py:626
↓ 8 callersMethodget_dummy_components
(self)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_img2img.py:523
↓ 8 callersMethodget_dummy_components
(self)
tests/pipelines/musicldm/test_musicldm.py:68
↓ 8 callersMethodget_dummy_components
(self, time_cond_proj_dim=None)
tests/pipelines/controlnet/test_controlnet_sdxl.py:79
↓ 8 callersMethodget_dummy_components
(self)
tests/pipelines/kandinsky2_2/test_kandinsky_combined.py:60
↓ 8 callersMethodget_dummy_components
(self, time_cond_proj_dim=None)
tests/pipelines/stable_diffusion/test_stable_diffusion_img2img.py:116
↓ 8 callersMethodget_dummy_components
(self)
tests/pipelines/kandinsky/test_kandinsky_combined.py:55
↓ 8 callersMethodget_dummy_components
(self)
tests/pipelines/audioldm2/test_audioldm2.py:73
↓ 8 callersMethodget_dummy_inputs
(self, device, seed=0, pil_image=True)
tests/pipelines/unclip/test_unclip_image_variation.py:227
↓ 8 callersMethodget_dummy_inputs
(self, device, seed=0, img_res=64)
tests/pipelines/controlnet/test_controlnet_inpaint_sdxl.py:141
↓ 8 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_img2img.py:169
↓ 8 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/pixart_alpha/test_pixart.py:90
↓ 8 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_ddpm.py:11
↓ 8 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_deis.py:19
↓ 8 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_dpm_multi.py:19
↓ 8 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_flax.py:350
↓ 8 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_flax.py:635
↓ 8 callersMethodget_sd_vae_model
(self, model_id="CompVis/stable-diffusion-v1-4", fp16=False)
tests/models/autoencoders/test_models_vae.py:575
↓ 8 callersMethodload_lora_into_unet
This will load the LoRA layers specified in `state_dict` into `unet`. Parameters: state_dict (`dict`): A
src/diffusers/loaders/lora.py:380
↓ 8 callersMethodnormalize
(self, x_in, key)
src/diffusers/experimental/rl/value_guided_sampling.py:71
↓ 8 callersMethodpush_to_hub
Upload model, scheduler, or pipeline files to the 🤗 Hugging Face Hub. Parameters: repo_id (`str`): The n
src/diffusers/utils/hub_utils.py:424
↓ 8 callersFunctionrenew_resnet_paths
(old_list, n_shave_prefix_segments=0)
scripts/convert_ddpm_original_checkpoint_to_diffusers.py:19
↓ 8 callersMethodset_scheduler
(self, scheduler_type: str)
examples/community/sd_text2img_k_diffusion.py:118
↓ 8 callersMethodstep_pred
Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion process from the learned m
src/diffusers/schedulers/scheduling_sde_ve.py:160
↓ 8 callersMethodto
(self, device)
tests/pipelines/semantic_stable_diffusion/test_semantic_diffusion.py:106
↓ 7 callersMethod__init__
(self, dim, eps: float, elementwise_affine: bool = True)
src/diffusers/models/normalization.py:213
↓ 7 callersMethod__init__
( self, inp_channels: int, out_channels: int, kernel_size: Union[int, Tuple[in
src/diffusers/models/resnet.py:432
↓ 7 callersMethod__init__
Construct a layernorm module in the T5 style. No bias and no subtraction of mean.
src/diffusers/models/transformers/t5_film_transformer.py:385
↓ 7 callersMethod__init__
( self, in_channels: int = 3, out_channels: int = 3, down_block_types: Tuple[s
src/diffusers/models/autoencoders/vae.py:70
↓ 7 callersMethod__init__
( self, prompts: List[str], words: [List[List[str]]], tokenizer, devic
examples/community/pipeline_prompt2prompt.py:1026
↓ 7 callersMethod__init__
(self, args)
benchmarks/base_classes.py:52
↓ 7 callersFunction_set_state_dict_into_text_encoder
Sets the `lora_state_dict` into `text_encoder` coming from `transformers`. Args: lora_state_dict: The state dictionary to be set.
src/diffusers/training_utils.py:149
↓ 7 callersMethod_shape
(self, tensor: torch.Tensor, seq_len: int, bsz: int)
src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py:331
↓ 7 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_ldm_original_checkpoint_to_diffusers.py:78
↓ 7 callersFunctionbackend_empty_cache
(device: str)
src/diffusers/utils/testing_utils.py:904
↓ 7 callersMethodbenchmark
(self, args)
benchmarks/base_classes.py:58
↓ 7 callersMethodcheck_over_configs
(self, time_step=0, **config)
tests/schedulers/test_scheduler_unipc.py:32
↓ 7 callersMethodcheck_over_configs
(self, time_step=0, **config)
tests/schedulers/test_scheduler_deis.py:31
↓ 7 callersMethodcuda
(self, dtype=torch.float16, use_xformers=False)
examples/community/pipeline_stable_diffusion_xl_instantid.py:442
↓ 7 callersFunctiondevice_view
(t)
examples/community/stable_diffusion_tensorrt_inpaint.py:91
↓ 7 callersFunctiondevice_view
(t)
examples/community/stable_diffusion_tensorrt_img2img.py:91
↓ 7 callersMethodencode_prompt
Encodes the previously tokenized prompt for this diffusion region using a given encoder
examples/community/mixture_canvas.py:145
↓ 7 callersMethodfrom_unet
r""" Instantiate a [`ControlNetXSModel`] from [`UNet2DConditionModel`]. Parameters: unet (`UNet2DConditionModel`):
examples/research_projects/controlnetxs/controlnetxs.py:363
↓ 7 callersMethodfull_loop
(self, scheduler=None, **config)
tests/schedulers/test_scheduler_dpm_single.py:100
↓ 7 callersMethodfull_loop
(self, scheduler=None, **config)
tests/schedulers/test_scheduler_dpm_multi_inverse.py:95
↓ 7 callersMethodget_dummy_components
(self)
tests/pipelines/stable_diffusion_2/test_stable_diffusion.py:80
↓ 7 callersMethodget_dummy_components
(self)
tests/pipelines/audioldm/test_audioldm.py:66
↓ 7 callersMethodget_dummy_components
(self, skip_first_text_encoder=False)
tests/pipelines/controlnet/test_controlnet_sdxl_img2img.py:62
↓ 7 callersMethodget_dummy_components
(self)
tests/pipelines/stable_diffusion_panorama/test_stable_diffusion_panorama.py:49
↓ 7 callersMethodget_dummy_components
(self, time_cond_proj_dim=None)
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py:120
↓ 7 callersMethodget_dummy_components
(self)
tests/pipelines/animatediff/test_animatediff.py:48
↓ 7 callersMethodget_dummy_components
(self)
tests/pipelines/animatediff/test_animatediff_video2video.py:46
↓ 7 callersMethodget_dummy_components
(self)
tests/pipelines/pia/test_pia.py:56
↓ 7 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_img2img.py:599
↓ 7 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/musicldm/test_musicldm.py:159
↓ 7 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/audioldm/test_audioldm.py:136
↓ 7 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/kandinsky2_2/test_kandinsky_combined.py:68
↓ 7 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion_panorama/test_stable_diffusion_panorama.py:98
↓ 7 callersMethodget_dummy_inputs
(self, seed=0)
tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_img2img.py:48
↓ 7 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/kandinsky/test_kandinsky_combined.py:63
↓ 7 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/audioldm2/test_audioldm2.py:193
↓ 7 callersMethodget_inputs
(self, device, generator_device="cpu", dtype=torch.float32, seed=0)
tests/pipelines/audioldm/test_audioldm.py:379
↓ 7 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_pndm.py:14
↓ 7 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_tcd.py:12
↓ 7 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_dpm_multi_inverse.py:14
↓ 7 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_consistency_model.py:12
↓ 7 callersMethodload_attn_procs
r""" Load pretrained attention processor layers into [`UNet2DConditionModel`]. Attention processor layers have to be defined in
src/diffusers/loaders/unet.py:74
↓ 7 callersFunctionload_hf_numpy
(path)
src/diffusers/utils/testing_utils.py:521
↓ 7 callersMethodpost_process_latents
(self, prior_latents)
src/diffusers/models/transformers/prior_transformer.py:378
↓ 7 callersFunctionprocess
(input_image, original_image, original_mask, input_mask, selected_points, prompt,
examples/brushnet/app_brushnet.py:62
↓ 7 callersFunctionrenew_attention_paths
Updates paths inside attentions to the new naming scheme (local renaming)
scripts/convert_i2vgen_to_diffusers.py:79
↓ 7 callersFunctionrenew_attention_paths
Updates paths inside attentions to the new naming scheme (local renaming)
scripts/convert_ms_text_to_video_to_diffusers.py:75
↓ 7 callersFunctionrun_test_in_subprocess
To run a test in a subprocess. In particular, this can avoid (GPU) memory issue. Args: test_case (`unittest.TestCase`):
src/diffusers/utils/testing_utils.py:722
↓ 7 callersMethodsave_attn_procs
r""" Save attention processor layers to a directory so that it can be reloaded with the [`~loaders.UNet2DConditionLoadersMixin.load_at
src/diffusers/loaders/unet.py:405
↓ 7 callersFunctionsegment
(a, n)
src/diffusers/pipelines/deprecated/spectrogram_diffusion/midi_utils.py:339
↓ 7 callersMethodset_chunk_feed_forward
(self, chunk_size: Optional[int], dim: int = 0)
src/diffusers/models/attention.py:286
↓ 7 callersFunctionshave_segments
Removes segments. Positive values shave the first segments, negative shave the last segments.
src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py:69
↓ 7 callersMethodsigma_to_t
Gets scaled timesteps from the Karras sigmas for input to the consistency model. Args: sigmas (`float` or `np.ndarray`):
src/diffusers/schedulers/scheduling_consistency_models.py:156
↓ 7 callersMethodstep_correct
Correct the predicted sample based on the `model_output` of the network. This is often run repeatedly after making the prediction for
src/diffusers/schedulers/scheduling_sde_ve.py:228
↓ 7 callersFunctiontokenize_prompt
(tokenizer, prompt)
examples/dreambooth/train_dreambooth_lora_sdxl.py:912
↓ 7 callersFunctiontokenize_prompt
(tokenizer, prompt, add_special_tokens=False)
examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py:1072
↓ 7 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:920
← previousnext →301–400 of 9,976, ranked by callers