MCPcopy Create free account

hub / github.com/bytedance/StyleSSP / functions

Functions440 in github.com/bytedance/StyleSSP

↓ 10 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
ip_adapter/pipeline_stable_diffusion_extra_cfg.py:305
↓ 10 callersMethodget_decouple_embeds
( self, pil_image=None, clip_image_embeds=None, prompt=None, query=Non
ip_adapter/ip_adapter_instruct.py:126
↓ 10 callersMethodscale_model_input
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep. Scales the
src/schedulers/euler_scheduler.py:37
↓ 8 callersFunctionget_image_paths
Returns the paths of the images in the specified directory, filtered by allowed file extensions. Args: path (str): Path to image director
evaluation/eval_artfid.py:158
↓ 7 callersMethod__init__
( self, num_classes1: int = 1000, num_classes2: int = 1000, aux_logits: bool =
src/evaluate/inception.py:22
↓ 7 callersMethod__init__
( self, num_classes1: int = 1000, num_classes2: int = 1000, aux_logits: bool =
evaluation/inception.py:22
↓ 6 callersMethodnormalize
(self, input)
evaluation/image_metrics.py:160
↓ 6 callersMethodstep
Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion process from the learned m
src/schedulers/lcm_scheduler.py:32
↓ 5 callersFunctionFeedForward
(dim, mult=4)
ip_adapter/resampler_Instruct.py:81
↓ 5 callersMethod__init__
(self)
src/metrics/lpips.py:79
↓ 4 callersFunctionFeedForward
(dim, mult=4)
ip_adapter/resampler_SD3.py:15
↓ 4 callersMethod__init__
(self, input_dim, hidden_dims, output_dim, dropout_rate=0.1)
ip_adapter/resampler_Instruct.py:17
↓ 4 callersMethod__init__
(self)
src/evaluate/image_metrics.py:68
↓ 4 callersMethod__init__
(self)
evaluation/image_metrics.py:68
↓ 4 callersMethod_get_clip_prompt_embeds
( self, prompt: Union[str, List[str]], num_images_per_prompt: int = 1, device:
ip_adapter/pipeline_stable_diffusion_sd3_extra_cfg.py:267
↓ 4 callersMethodgram_matrix
(self, input)
src/evaluate/image_metrics.py:163
↓ 4 callersMethodgram_matrix
(self, input)
evaluation/image_metrics.py:163
↓ 4 callersFunctionnormalize
(x)
src/evaluate/image_metrics.py:27
↓ 4 callersMethodnormalize
(self, input)
src/evaluate/image_metrics.py:160
↓ 4 callersMethodset_scale
(self, scale)
ip_adapter/ip_adapter_instruct.py:613
↓ 4 callersFunctionspherical_dist_loss
(x, y)
src/renoise_inversion.py:252
↓ 3 callersMethod__init__
( self, hidden_size=None, cross_attention_dim=None, )
ip_adapter/attention_processor.py:16
↓ 3 callersMethodcheck_inputs
( self, prompt, prompt_2, strength, num_inference_steps, callb
pipeline_controlnet_sd_xl_img2img.py:552
↓ 3 callersMethodencode_image
(self, image, device, num_images_per_prompt, output_hidden_states=None)
pipeline_controlnet_sd_xl_img2img.py:765
↓ 3 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
pipeline_controlnet_sd_xl_img2img.py:300
↓ 3 callersMethodgenerate
( self, pil_image=None, clip_image_embeds=None, prompt=None, negative_
ip_adapter/ip_adapter.py:164
↓ 3 callersFunctionget_activations
Computes the activations of for all images. Args: files (list): List of image file paths. model (torch.nn.Module): Model for comp
evaluation/eval_artfid.py:42
↓ 3 callersFunctionget_canny_map
(input_image_cv2)
infer_style.py:132
↓ 3 callersMethodget_feats
(self, img)
src/evaluate/image_metrics.py:152
↓ 3 callersMethodget_feats
(self, img)
evaluation/image_metrics.py:152
↓ 3 callersMethodget_timesteps
(self, num_inference_steps, strength, device, denoising_start=None)
pipeline_controlnet_sd_xl_img2img.py:642
↓ 3 callersMethodinv_step
Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion process from the learned m
src/schedulers/lcm_scheduler.py:126
↓ 3 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
pipeline_controlnet_sd_xl_img2img.py:535
↓ 3 callersMethodprepare_latents
( self, image, timestep, batch_size, num_images_per_prompt, dtype, device, generator=None, add_noise=T
pipeline_controlnet_sd_xl_img2img.py:678
↓ 3 callersFunctionreshape_tensor
(x, heads)
ip_adapter/resampler_Instruct.py:94
↓ 3 callersFunctionreshape_tensor
(x, heads)
ip_adapter/resampler_SD3.py:25
↓ 3 callersFunctionreshape_tensor
(x, heads)
ip_adapter/resampler.py:25
↓ 3 callersFunctionreshape_tensor_multihead
(x, heads)
ip_adapter/resampler_Instruct.py:91
↓ 3 callersMethodset_requires_grad
(self, state: bool)
src/metrics/lpips.py:36
↓ 3 callersMethodset_scale
(self, scale)
ip_adapter/ip_adapter.py:159
↓ 3 callersMethodupcast_vae
(self)
pipeline_controlnet_sd_xl_img2img.py:887
↓ 2 callersMethod__init__
( self, dim=1024, depth=8, dim_head=64, heads=16, num_queries=
ip_adapter/resampler_SD3.py:84
↓ 2 callersMethod__init__
(self, sd_pipe, image_encoder_path, ip_ckpt, device, num_tokens=4)
ip_adapter/ip_adapter.py:72
↓ 2 callersMethod_encode_vae_image
(self, image: torch.Tensor, generator: torch.Generator)
pipeline_controlnet_inpaint_sd_xl.py:1138
↓ 2 callersMethod_forward
(self, x: Tensor, return_features: bool=False)
src/evaluate/inception.py:92
↓ 2 callersMethod_forward
(self, x: Tensor, return_features: bool=False)
evaluation/inception.py:92
↓ 2 callersMethod_get_add_time_ids
( self, original_size, crops_coords_top_left, target_size, aesthetic_s
pipeline_controlnet_sd_xl_img2img.py:835
↓ 2 callersMethod_get_add_time_ids
( self, original_size, crops_coords_top_left, target_size, dtype, text_encoder_projection_dim=None
ip_adapter/pipeline_stable_diffusion_sdxl_extra_cfg.py:730
↓ 2 callersMethod_get_t5_prompt_embeds
( self, prompt: Union[str, List[str]] = None, num_images_per_prompt: int = 1,
ip_adapter/pipeline_stable_diffusion_sd3_extra_cfg.py:211
↓ 2 callersMethodcalc_mean_std
(self, feat, eps=1e-5)
src/evaluate/net.py:88
↓ 2 callersMethodcalc_mean_std
(self, feat, eps=1e-5)
evaluation/net.py:88
↓ 2 callersMethodcheck_image
(self, image, prompt, prompt_embeds)
pipeline_controlnet_inpaint_sd_xl.py:769
↓ 2 callersMethodcheck_image
(self, image, prompt, prompt_embeds)
pipeline_controlnet_sd_xl_img2img_plus.py:851
↓ 2 callersFunctioncompute_activation_statistics
Computes the activation statistics used by the FID. Args: files (list): List of image file paths. model (torch.nn.Module): Mo
evaluation/eval_artfid.py:138
↓ 2 callersFunctioncompute_content_distance
Computes the distance for the given paths. Args: path_to_stylized (str): Path to the stylized images. path_to_style (str): Path t
evaluation/eval_artfid.py:264
↓ 2 callersFunctioncompute_frechet_distance
Numpy implementation of the Frechet Distance. Args: mu1 (np.ndarray): Sample mean of activations of stylized images. mu2 (np.
evaluation/eval_artfid.py:90
↓ 2 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
ip_adapter/pipeline_stable_diffusion_sdxl_extra_cfg.py:271
↓ 2 callersMethodencode_with_intermediate
(self, input)
src/evaluate/net.py:81
↓ 2 callersMethodencode_with_intermediate
(self, input)
evaluation/net.py:81
↓ 2 callersFunctionfreq_2d
Noise reinitialization. Args: x: diffused latent noise: randomly sampled noise LPF: low pass filter
src/frequency_utils.py:16
↓ 2 callersFunctiongenerate_caption
( image: Image.Image, text: str = None, decoding_method: str = "Nucleus sampling", temperature
infer_style.py:54
↓ 2 callersFunctionget_depth_map
(image)
infer_style.py:110
↓ 2 callersMethodget_feats
(self, img)
src/evaluate/image_metrics.py:100
↓ 2 callersMethodget_feats
(self, img)
evaluation/image_metrics.py:100
↓ 2 callersFunctionget_freq_filter
Form the frequency filter for noise reinitialization. Args: shape: shape of latent (B, C, T, H, W) filter_type: type of the
src/frequency_utils.py:190
↓ 2 callersFunctionget_generator
(seed, device)
ip_adapter/utils.py:86
↓ 2 callersMethodget_guidance_scale_embedding
See https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298 Args: w (`tor
pipeline_controlnet_sd_xl_img2img.py:905
↓ 2 callersMethodget_image_embeds
(self, pil_image=None, clip_image_embeds=None)
ip_adapter/ip_adapter_instruct.py:592
↓ 2 callersMethodget_image_embeds
(self, pil_image=None, clip_image_embeds=None,dtype=torch.float32)
ip_adapter/ip_adapter.py:147
↓ 2 callersMethodget_single_image_embeds
(self, pil_image=None,clip_image=None,clip_image_embeds=None,instruct_embeds=None,prompt_embeds=None)
ip_adapter/ip_adapter_instruct.py:114
↓ 2 callersFunctioninversion_step
( pipe, z_t: torch.tensor, t: torch.tensor, prompt_embeds, added_cond_kwargs, num_reno
src/renoise_inversion.py:122
↓ 2 callersMethodload_ip_adapter
(self)
ip_adapter/ip_adapter.py:130
↓ 2 callersFunctionnoise_regularization
( e_t, noise_pred_optimal, lambda_kl, lambda_ac, num_reg_steps, num_ac_rolls, generator=None )
src/renoise_inversion.py:13
↓ 2 callersFunctionnormalize
(x)
evaluation/image_metrics.py:27
↓ 2 callersMethodnormalize
(self, input)
src/evaluate/image_metrics.py:108
↓ 2 callersMethodnormalize
(self, input)
evaluation/image_metrics.py:108
↓ 2 callersFunctionpatchify_tensor
(input_tensor)
src/renoise_inversion.py:64
↓ 2 callersMethodprepare_control_image
( self, image, width, height, batch_size, num_images_per_promp
pipeline_controlnet_inpaint_sd_xl.py:1023
↓ 2 callersMethodprepare_control_image
( self, image, width, height, batch_size, num_images_per_promp
pipeline_controlnet_sd_xl_img2img_plus.py:889
↓ 2 callersFunctionreplace_transformer_blocks
(original_model)
ip_adapter/ip_adapter_instruct.py:475
↓ 2 callersFunctionretrieve_latents
( encoder_output: torch.Tensor, generator: Optional[torch.Generator] = None, sample_mode: str = "sample" )
pipeline_controlnet_inpaint_sd_xl.py:80
↓ 2 callersFunctionretrieve_latents
( encoder_output: torch.Tensor, generator: Optional[torch.Generator] = None, sample_mode: str = "sample" )
pipeline_controlnet_sd_xl_img2img_plus.py:159
↓ 2 callersFunctionretrieve_latents
( encoder_output: torch.Tensor, generator: Optional[torch.Generator] = None, sample_mode: str = "sample" )
pipeline_controlnet_sd_xl_img2img.py:111
↓ 2 callersFunctionretrieve_timesteps
Calls the scheduler's `set_timesteps` method and retrieves timesteps from the scheduler after the call. Handles custom timesteps. Any kwargs
pipeline_controlnet_sd_xl_img2img.py:125
↓ 2 callersFunctionretrieve_timesteps
Calls the scheduler's `set_timesteps` method and retrieves timesteps from the scheduler after the call. Handles custom timesteps. Any kwargs
ip_adapter/pipeline_stable_diffusion_extra_cfg.py:76
↓ 2 callersMethodset_ip_adapter
(self, n=2)
ip_adapter/ip_adapter_instruct.py:530
↓ 2 callersMethodset_noise_list
(self, noise_list)
src/schedulers/lcm_scheduler.py:29
↓ 2 callersFunctionspherical_dist_loss
(x, y)
pipeline_controlnet_sd_xl_img2img_plus.py:77
↓ 2 callersFunctionunet_pass
(pipe, z_t, t, prompt_embeds, added_cond_kwargs)
src/renoise_inversion.py:376
↓ 1 callersFunctionFeedForward
(dim, mult=4)
ip_adapter/resampler.py:15
↓ 1 callersMethod__init__
(self,num_tokens)
ip_adapter/ip_joint_attention.py:155
↓ 1 callersMethod__init__
( self, dim=1024, depth=8, dim_head=64, heads=16, num_queries=
ip_adapter/resampler.py:84
↓ 1 callersMethod__init__
(self, gpu_ids=[])
src/evaluate/net.py:118
↓ 1 callersMethod__init__
(self, gpu_ids=[])
evaluation/net.py:118
↓ 1 callersMethod_forward
(self, x: Tensor)
src/evaluate/inception.py:190
↓ 1 callersMethod_forward
(self, x: Tensor)
src/evaluate/inception.py:222
↓ 1 callersMethod_forward
(self, x: Tensor)
src/evaluate/inception.py:261
↓ 1 callersMethod_forward
(self, x: Tensor)
src/evaluate/inception.py:298
↓ 1 callersMethod_forward
(self, x: Tensor)
src/evaluate/inception.py:334
↓ 1 callersMethod_forward
(self, x: Tensor)
evaluation/inception.py:190
next →1–100 of 440, ranked by callers