MCPcopy Create free account

hub / github.com/TencentARC/BrushNet / functions

Functions9,976 in github.com/TencentARC/BrushNet

↓ 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 callersMethodcheck_over_configs
(self, time_step=0, **config)
tests/schedulers/test_scheduler_dpm_multi.py:41
↓ 14 callersMethodencode
(self, x: torch.FloatTensor, return_dict: bool = True)
src/diffusers/models/vq_model.py:130
↓ 14 callersMethodget_dummy_components
(self)
tests/pipelines/stable_video_diffusion/test_stable_video_diffusion.py:59
↓ 14 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion_2/test_stable_diffusion_depth.py:163
↓ 14 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/controlnet/test_controlnet_sdxl.py:167
↓ 14 callersMethodget_dummy_inputs_by_type
(self, device, seed=0, input_image_type="pt", output_type="np")
tests/pipelines/test_pipelines_common.py:372
↓ 14 callersFunctionis_bs4_available
()
src/diffusers/utils/import_utils.py:375
↓ 14 callersFunctionis_ftfy_available
()
src/diffusers/utils/import_utils.py:371
↓ 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_loading_utils.py:85
↓ 14 callersMethodlora_state_dict
r""" Return state dict for lora weights and the network alphas. <Tip warning={true}> We support loading A1111 formatted LoRA
src/diffusers/loaders/lora.py:144
↓ 14 callersMethodrestore
r""" Args: Restore the parameters stored with the `store` method. Useful to validate the model with EMA parameters without: af
src/diffusers/training_utils.py:390
↓ 13 callersFunction_get_library_root_logger
()
src/diffusers/utils/logging.py:73
↓ 13 callersMethod_get_signature_keys
(cls, obj)
src/diffusers/pipelines/pipeline_utils.py:1459
↓ 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:156
↓ 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:149
↓ 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:142
↓ 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:149
↓ 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
examples/research_projects/promptdiffusion/convert_original_promptdiffusion_to_diffusers.py:170
↓ 13 callersFunctioncompute_snr
Computes SNR as per https://github.com/TiankaiHang/Min-SNR-Diffusion-Training/blob/521b624bd70c67cee4bdf49225915f5945a872e3/guided_diffusion/
src/diffusers/training_utils.py:50
↓ 13 callersMethoddownsample
Downsamples the provided mask tensor to match the expected dimensions for scaled dot-product attention. If the aspect ratio of the ma
src/diffusers/image_processor.py:931
↓ 13 callersMethodfrom_pretrained
r""" Instantiate a pretrained MultiAdapter model from multiple pre-trained adapter models. The model is set in evaluation mode by def
src/diffusers/models/adapter.py:146
↓ 13 callersMethodfull_loop
(self, scheduler=None, **config)
tests/schedulers/test_scheduler_unipc.py:90
↓ 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, img_res=64, output_pil=True)
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py:170
↓ 13 callersMethodget_scheduler_config
(self)
tests/schedulers/test_schedulers.py:355
↓ 13 callersMethodset_attn_processor
r""" Sets the attention processor to use to compute attention. Parameters: processor (`dict` of `AttentionProcessor` or o
examples/research_projects/controlnetxs/controlnetxs.py:497
↓ 13 callersMethodset_lora_layer
(self, lora_layer: Optional[LoRAConv2dLayer])
src/diffusers/models/lora.py:305
↓ 12 callersFunction_get_model_file
( pretrained_model_name_or_path: Union[str, Path], *, weights_name: str, subfolder: Optional[s
src/diffusers/utils/hub_utils.py:277
↓ 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:144
↓ 12 callersMethodcheck_dims
(self, batch_size, image_height, image_width)
examples/community/stable_diffusion_tensorrt_inpaint.py:273
↓ 12 callersMethodcheck_dims
(self, batch_size, image_height, image_width)
examples/community/stable_diffusion_tensorrt_img2img.py:273
↓ 12 callersMethodcheck_over_configs
(self, time_step=0, **config)
tests/schedulers/test_scheduler_dpm_multi_inverse.py:34
↓ 12 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:81
↓ 12 callersMethodget_dummy_inputs_with_latents
(self, device, seed=0)
tests/pipelines/unidiffuser/test_unidiffuser.py:181
↓ 12 callersMethodget_generator
(self, device, seed=0)
tests/pipelines/text_to_video_synthesis/test_text_to_video_zero_sdxl.py:152
↓ 12 callersMethodget_inputs
(self, device, generator_device="cpu", dtype=torch.float32, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py:572
↓ 12 callersFunctionis_note_seq_available
()
src/diffusers/utils/import_utils.py:355
↓ 12 callersMethodprepare_latents
( self, image: Image.Image, text_embeds: torch.Tensor, timesteps: torch.Tensor
examples/community/edict_pipeline.py:138
↓ 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:549
↓ 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 callersMethodset_begin_index
Sets the begin index for the scheduler. This function should be run from pipeline before the inference. Args: begin_inde
src/diffusers/schedulers/scheduling_lcm.py:291
↓ 12 callersMethodsort
(a, b)
src/diffusers/schedulers/scheduling_dpmsolver_sde.py:44
↓ 11 callersMethod__init__
( self, in_channels: int, prev_output_channel: int, out_channels: int,
src/diffusers/pipelines/deprecated/versatile_diffusion/modeling_text_unet.py:1790
↓ 11 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
src/diffusers/schedulers/scheduling_deis_multistep.py:339
↓ 11 callersMethod_test_inference_batch_consistent
( self, batch_sizes=[2], additional_params_copy_to_batched_inputs=["num_inference_steps"], batch_gener
tests/pipelines/test_pipelines_common.py:729
↓ 11 callersFunctioncast_training_params
(model: Union[torch.nn.Module, List[torch.nn.Module]], dtype=torch.float32)
src/diffusers/training_utils.py:139
↓ 11 callersMethodcheck_over_configs
(self, time_step=0, **config)
tests/schedulers/test_scheduler_dpm_single.py:39
↓ 11 callersMethoddevice
r""" Returns: `torch.device`: The torch device on which the pipeline is located.
src/diffusers/pipelines/pipeline_utils.py:434
↓ 11 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/controlnet/test_controlnet_sdxl_img2img.py:149
↓ 11 callersMethodget_encoder_hidden_states
(self, seed=0, shape=(4, 77, 768), fp16=False)
tests/models/unets/test_models_unet_2d_condition.py:1024
↓ 11 callersMethodget_latents
(self, seed=0, shape=(4, 4, 64, 64), fp16=False)
tests/models/unets/test_models_unet_2d_condition.py:926
↓ 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/unets/test_models_unet_2d_condition.py:931
↓ 11 callersFunctionis_peft_available
()
src/diffusers/utils/import_utils.py:387
↓ 11 callersFunctionload_model_dict_into_meta
( model, state_dict: OrderedDict, device: Optional[Union[str, torch.device]] = None, dtype: Op
src/diffusers/models/modeling_utils.py:131
↓ 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/brushnet.py:609
↓ 11 callersMethodto_np
(self, image)
tests/others/test_image_processor.py:48
↓ 11 callersFunctionunwrap_model
(model)
examples/dreambooth/train_dreambooth.py:943
↓ 10 callersMethod__init__
( self, query_dim: int, cross_attention_dim: Optional[int] = None, heads: int
src/diffusers/models/attention_processor.py:91
↓ 10 callersMethodcheck_over_configs
(self, time_step=0, **config)
tests/schedulers/test_scheduler_flax.py:384
↓ 10 callersFunctionconvert_vae_block_state_dict
(old_state_dict, prefix_from, new_state_dict, prefix_to)
scripts/convert_amused.py:476
↓ 10 callersMethodget_dummy_components
(self)
tests/pipelines/unidiffuser/test_unidiffuser.py:89
↓ 10 callersMethodget_dummy_inputs
(self, seed=0)
tests/pipelines/stable_diffusion/test_onnx_stable_diffusion.py:42
↓ 10 callersMethodget_inputs
(self, device, generator_device="cpu", dtype=torch.float32, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_img2img.py:397
↓ 10 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_unipc.py:19
↓ 10 callersFunctionis_accelerate_version
Args: Compares the current Accelerate version to a given reference with an operation. operation (`str`): A string represe
src/diffusers/utils/import_utils.py:617
↓ 10 callersFunctionis_librosa_available
()
src/diffusers/utils/import_utils.py:339
↓ 10 callersMethodload_lora_into_text_encoder
This will load the LoRA layers specified in `state_dict` into `text_encoder` Parameters: state_dict (`dict`):
src/diffusers/loaders/lora.py:488
↓ 10 callersFunctionrenew_resnet_paths
Updates paths inside resnets to the new naming scheme (local renaming)
scripts/convert_svd_to_diffusers.py:223
↓ 10 callersFunctionrun_command
Runs `command` with `subprocess.check_output` and will potentially return the `stdout`. Will also properly capture if an error occurred while
benchmarks/run_all.py:19
↓ 10 callersMethodset_ip_adapter_scale
Sets the conditioning scale between text and image. Example: ```py pipeline.set_ip_adapter_scale(0.5) ```
src/diffusers/loaders/ip_adapter.py:230
↓ 10 callersFunctionshave_segments
Removes segments. Positive values shave the first segments, negative shave the last segments.
scripts/convert_ddpm_original_checkpoint_to_diffusers.py:9
↓ 9 callersFunction_configure_library_root_logger
()
src/diffusers/utils/logging.py:77
↓ 9 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
src/diffusers/schedulers/scheduling_edm_dpmsolver_multistep.py:337
↓ 9 callersMethodcheck_dims
(self, batch_size, image_height, image_width)
examples/community/stable_diffusion_tensorrt_txt2img.py:258
↓ 9 callersMethodcheck_over_configs
(self, time_step=0, **config)
tests/schedulers/test_scheduler_edm_dpmsolver_multistep.py:37
↓ 9 callersFunctionconvert_resnet
(checkpoint, new_checkpoint, old_prefix, new_prefix, has_skip=False)
scripts/convert_consistency_to_diffusers.py:123
↓ 9 callersMethoddummy_cond_unet
(self, sample_size=32)
tests/pipelines/test_pipelines.py:1085
↓ 9 callersMethodget_dummy_components
(self)
tests/pipelines/stable_diffusion_2/test_stable_diffusion_depth.py:81
↓ 9 callersMethodget_dummy_components
(self, seed=0)
tests/pipelines/text_to_video_synthesis/test_text_to_video_zero_sdxl.py:53
↓ 9 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/animatediff/test_animatediff.py:109
↓ 9 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/animatediff/test_animatediff_video2video.py:107
↓ 9 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/pia/test_pia.py:118
↓ 9 callersMethodget_inputs
(self, device, generator_device="cpu", dtype=torch.float32, seed=0)
tests/pipelines/stable_diffusion_2/test_stable_diffusion.py:324
↓ 9 callersMethodget_inputs
(self, device, generator_device="cpu", dtype=torch.float32, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py:833
↓ 9 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_dpm_single.py:19
↓ 9 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_ddpm_parallel.py:25
↓ 9 callersMethodget_sd_image
(self, seed=0, shape=(4, 3, 512, 512), fp16=False)
tests/models/autoencoders/test_models_vae.py:570
↓ 9 callersFunctionget_up_block
( up_block_type: str, num_layers: int, in_channels: int, out_channels: int, temb_channels: int, add_upsamp
src/diffusers/models/unets/unet_1d_blocks.py:651
↓ 9 callersFunctionmake_image_grid
Prepares a single grid of images. Useful for visualization purposes.
src/diffusers/utils/pil_utils.py:53
↓ 9 callersMethodnumpy_to_pt
Convert a NumPy image to a PyTorch tensor.
src/diffusers/image_processor.py:114
↓ 9 callersMethodprepare_init_args_and_inputs_for_common
(self)
tests/models/unets/test_models_unet_motion.py:66
↓ 9 callersMethodsigmoid
(theta0, theta1, theta2, alpha)
examples/community/checkpoint_merger.py:274
↓ 9 callersFunctionto_np
(tensor)
tests/pipelines/text_to_video_synthesis/test_text_to_video_zero_sdxl.py:38
← previousnext →201–300 of 9,976, ranked by callers