MCPcopy Create free account

hub / github.com/LetterLiGo/SafeGen_CCS2024 / functions

Functions7,383 in github.com/LetterLiGo/SafeGen_CCS2024

↓ 5 callersFunctionrenew_resnet_paths
Updates paths inside resnets to the new naming scheme (local renaming)
scripts/convert_original_audioldm2_to_diffusers.py:64
↓ 5 callersFunctionrenew_resnet_paths
Updates paths inside resnets to the new naming scheme (local renaming)
scripts/convert_versatile_diffusion_to_diffusers.py:106
↓ 5 callersMethodset_attn_processor
r""" Sets the attention processor to use to compute attention. Parameters: processor (`dict` of `AttentionProcessor` or o
src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_prior.py:94
↓ 5 callersMethodset_chunk_feed_forward
(self, chunk_size: Optional[int], dim: int = 0)
src/diffusers/models/attention.py:241
↓ 5 callersMethodset_image_to_text_mode
r"""Manually set the generation mode to image-conditioned text generation.
src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py:260
↓ 5 callersMethodset_text_to_image_mode
r"""Manually set the generation mode to text-conditioned image generation.
src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py:256
↓ 5 callersFunctionshave_segments
Removes segments. Positive values shave the first segments, negative shave the last segments.
scripts/convert_original_audioldm2_to_diffusers.py:53
↓ 5 callersFunctionshave_segments
Removes segments. Positive values shave the first segments, negative shave the last segments.
scripts/convert_svd_to_diffusers.py:213
↓ 5 callersFunctionshave_segments
Removes segments. Positive values shave the first segments, negative shave the last segments.
scripts/convert_versatile_diffusion_to_diffusers.py:96
↓ 5 callersFunctionshave_segments
Removes segments. Positive values shave the first segments, negative shave the last segments.
scripts/convert_original_audioldm_to_diffusers.py:46
↓ 5 callersFunctionshave_segments
Removes segments. Positive values shave the first segments, negative shave the last segments.
scripts/convert_zero123_to_diffusers.py:191
↓ 5 callersFunctionshave_segments
Removes segments. Positive values shave the first segments, negative shave the last segments.
scripts/convert_original_musicldm_to_diffusers.py:47
↓ 5 callersMethodsimulate_backprop
(self, unet)
tests/others/test_ema.py:54
↓ 5 callersFunctionzero_module
(module)
src/diffusers/models/controlnet.py:861
↓ 4 callersMethod__init__
( self, in_channels: int, out_channels: int, prev_output_channel: int,
src/diffusers/pipelines/audioldm2/modeling_audioldm2.py:1340
↓ 4 callersMethod__init__
(self, c, c_skip=0, kernel_size=3, dropout=0.0)
src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_common.py:46
↓ 4 callersMethod__init__
( self, in_features: int, out_features: int, rank: int = 4, network_al
src/diffusers/models/lora.py:193
↓ 4 callersMethod_combine
r""" Combines a latent iamge img_vae of shape (B, C, H, W) and a CLIP-embedded image img_clip of shape (B, 1, clip_img_dim) into a sin
src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py:789
↓ 4 callersMethod_get_init_keys
(cls)
src/diffusers/configuration_utils.py:444
↓ 4 callersFunction_get_pipeline_class
( class_obj, config, load_connected_pipeline=False, custom_pipeline=None, repo_id=None,
src/diffusers/pipelines/pipeline_utils.py:346
↓ 4 callersMethod_load_ip_adapter_weights
(self, state_dict)
src/diffusers/loaders/unet.py:667
↓ 4 callersMethod_modify_text_encoder
r""" Monkey-patches the forward passes of attention modules of the text encoder.
src/diffusers/loaders/lora.py:698
↓ 4 callersFunction_print_list
Pretty print a list of elements with one line per element and a - starting each line.
utils/tests_fetcher.py:840
↓ 4 callersFunctionadd_noise_common
( state: CommonSchedulerState, original_samples: jnp.ndarray, noise: jnp.ndarray, timesteps: jnp.ndarray )
src/diffusers/schedulers/scheduling_utils_flax.py:280
↓ 4 callersFunctionalpha_bar
(time_step)
src/diffusers/schedulers/scheduling_utils_flax.py:212
↓ 4 callersMethodcheck_latents_shape
(self, latents_name, latents, expected_shape)
src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py:950
↓ 4 callersMethodcheck_over_configs
(self, time_step=0, **config)
tests/schedulers/test_scheduler_flax.py:646
↓ 4 callersFunctioncompare_versions
Args: Compares a library version to some requirement using a given operation. library_or_version (`str` or `packaging.version.Version
src/diffusers/utils/import_utils.py:563
↓ 4 callersFunctioncosine_distance
(image_embeds, text_embeds)
src/diffusers/pipelines/stable_diffusion_safe/safety_checker.py:25
↓ 4 callersFunctioncosine_distance
(image_embeds, text_embeds)
src/diffusers/pipelines/stable_diffusion/safety_checker.py:26
↓ 4 callersFunctioncreate_dummy_object
Create the code for the dummy object corresponding to `name`.
utils/check_dummies.py:105
↓ 4 callersFunctioncreate_unet_lora_layers
(unet: nn.Module)
tests/lora/test_lora_layers_old_backend.py:94
↓ 4 callersMethodenable_sequential_cpu_offload
r""" Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet, text_encoder, vae and safety
src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py:181
↓ 4 callersMethodenable_sequential_cpu_offload
r""" Offloads all models (`unet`, `text_encoder`, `vae`, and `safety checker` state dicts) to CPU using 🤗 Accelerate, significantly re
src/diffusers/pipelines/kandinsky/pipeline_kandinsky_combined.py:195
↓ 4 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py:292
↓ 4 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py:314
↓ 4 callersMethodevent_type_range
Return [min_id, max_id] for an event type.
src/diffusers/pipelines/spectrogram_diffusion/midi_utils.py:200
↓ 4 callersFunctionextract_sub_model
Takes a state dict and returns the state dict for a particular sub-model.
scripts/convert_original_audioldm2_to_diffusers.py:713
↓ 4 callersFunctionfind_backend
Find one (or multiple) backend in a code line of the init.
utils/check_dummies.py:58
↓ 4 callersFunctionfind_backend
Find one (or multiple) backend in a code line of the init.
utils/check_inits.py:50
↓ 4 callersMethodfull_loop
(self, **config)
tests/schedulers/test_scheduler_pndm.py:93
↓ 4 callersMethodfull_loop
(self, **config)
tests/schedulers/test_scheduler_ddim.py:24
↓ 4 callersMethodfull_loop
(self, **config)
tests/schedulers/test_scheduler_ddim_parallel.py:38
↓ 4 callersMethodfull_loop
(self, **config)
tests/schedulers/test_scheduler_ddim_inverse.py:24
↓ 4 callersMethodgelu
(self, gate: torch.Tensor)
src/diffusers/models/activations.py:65
↓ 4 callersMethodgenerate_language_model
Generates a sequence of hidden-states from the language model, conditioned on the embedding inputs. Parameters: inputs_
src/diffusers/pipelines/audioldm2/pipeline_audioldm2.py:229
↓ 4 callersMethodget_dummy_components
(self, adapter_type="full_adapter_xl", time_cond_proj_dim=None)
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_adapter.py:63
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/unclip/test_unclip_image_variation.py:190
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/stable_diffusion_2/test_stable_diffusion_diffedit.py:61
↓ 4 callersMethodget_dummy_components
(self, class_cond=False)
tests/pipelines/consistency_models/test_consistency_models.py:63
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/latent_consistency_models/test_latent_consistency_models.py:36
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/latent_consistency_models/test_latent_consistency_models_img2img.py:46
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/kandinsky2_2/test_kandinsky_combined.py:184
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/kandinsky2_2/test_kandinsky_combined.py:305
↓ 4 callersMethodget_dummy_components
(self, time_cond_proj_dim=None)
tests/pipelines/stable_diffusion/test_stable_diffusion_adapter.py:387
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/stable_diffusion/test_stable_diffusion_model_editing.py:50
↓ 4 callersMethodget_dummy_components
(self, time_cond_proj_dim=None)
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py:330
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/kandinsky/test_kandinsky_inpaint.py:223
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/kandinsky/test_kandinsky.py:207
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/kandinsky/test_kandinsky_img2img.py:229
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/kandinsky/test_kandinsky_combined.py:163
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/kandinsky/test_kandinsky_combined.py:272
↓ 4 callersMethodget_dummy_components
(self)
tests/pipelines/wuerstchen/test_wuerstchen_combined.py:130
↓ 4 callersMethodget_dummy_components_with_full_downscaling
Get dummy components with x8 VAE downscaling and 4 UNet down blocks. These dummy components are intended to fully-exercise the T2I-Adapter
tests/pipelines/stable_diffusion/test_stable_diffusion_adapter.py:144
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/unidiffuser/test_unidiffuser.py:147
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/consistency_models/test_consistency_models.py:83
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/latent_consistency_models/test_latent_consistency_models.py:94
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/latent_consistency_models/test_latent_consistency_models_img2img.py:104
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/controlnet/test_controlnet_img2img.py:279
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/controlnet/test_controlnet_sdxl.py:482
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/controlnet/test_controlnet_inpaint.py:351
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/controlnet/test_controlnet.py:373
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/controlnet/test_controlnet.py:551
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_ldm3d.py:99
↓ 4 callersMethodget_dummy_inputs
(self, device, height=64, width=64, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_adapter.py:393
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_model_editing.py:98
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/deepfloyd_if/test_if.py:49
↓ 4 callersMethodget_dummy_inputs
(self, device, seed=0)
tests/pipelines/animatediff/test_animatediff.py:107
↓ 4 callersFunctionget_indent
Returns the indent in given line (as string).
utils/custom_init_isort.py:58
↓ 4 callersMethodget_inputs
(self, device="cpu", dtype=torch.float32, seed=0)
tests/pipelines/stable_diffusion_2/test_stable_diffusion_depth.py:525
↓ 4 callersMethodget_inputs
(self, device, seed=0, generate_latents=False)
tests/pipelines/unidiffuser/test_unidiffuser.py:582
↓ 4 callersMethodget_inputs
(self, seed=0, get_fixed_latents=False, device="cpu", dtype=torch.float32, shape=(1, 3, 64, 64))
tests/pipelines/consistency_models/test_consistency_models.py:178
↓ 4 callersMethodget_inputs
(self, device, generator_device="cpu", dtype=torch.float32, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_img2img.py:591
↓ 4 callersMethodget_inputs
(self, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_panorama.py:258
↓ 4 callersMethodget_inputs
(self, generator_device="cpu", seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint_legacy.py:410
↓ 4 callersMethodget_inputs
(self, device, generator_device="cpu", dtype=torch.float32, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint_legacy.py:546
↓ 4 callersMethodget_inputs
(self, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_pix2pix_zero.py:379
↓ 4 callersMethodget_inputs
(self, device, generator_device="cpu", dtype=torch.float32, seed=0)
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py:955
↓ 4 callersMethodget_list_adapters
Gets the current list of all available adapters in the pipeline.
src/diffusers/loaders/lora.py:1196
↓ 4 callersFunctionget_module_dependencies
Refines the result of `extract_imports` to remove subfolders and get a proper list of module filenames: if a file as an import `from utils im
utils/tests_fetcher.py:556
↓ 4 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_dpm_sde.py:14
↓ 4 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_kdpm2_discrete.py:13
↓ 4 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_unclip.py:12
↓ 4 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_kdpm2_ancestral.py:13
↓ 4 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_ddim.py:12
↓ 4 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_score_sde_ve.py:47
↓ 4 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_ipndm.py:14
↓ 4 callersMethodget_scheduler_config
(self, **kwargs)
tests/schedulers/test_scheduler_euler_ancestral.py:13
↓ 4 callersMethodget_velocity
( self, sample: torch.FloatTensor, noise: torch.FloatTensor, timesteps: torch.IntTensor )
src/diffusers/schedulers/scheduling_lcm.py:595
↓ 4 callersFunctionis_scipy_available
()
src/diffusers/utils/import_utils.py:320
← previousnext →401–500 of 7,383, ranked by callers