MCPcopy Create free account

hub / github.com/WUyinwei-hah/IFAdapter / functions

Functions83 in github.com/WUyinwei-hah/IFAdapter

↓ 6 callersMethod__init__
( self, dim=1024, depth=8, dim_head=160, heads=16, num_queries
if_adapter/resampler.py:192
↓ 5 callersMethod__init__
(self, bias=False)
if_adapter/attention_processor.py:14
↓ 3 callersFunctioncreate_dataloader
(tokenizer=None, tokenizer_2=None, img_size=512, txt_file="/group/40021/wuyinwei/SpatialGuidanceDiffusion/vis.
ifa_dataset.py:295
↓ 3 callersFunctionreshape_tensor
(x, heads)
if_adapter/resampler.py:69
↓ 2 callersMethod_get_add_time_ids
( self, original_size, crops_coords_top_left, target_size, dtype, text_encoder_projection_dim=None
if_adapter/sdxl_pipeline.py:725
↓ 2 callersFunctionexists
(v)
if_adapter/attention_processor.py:7
↓ 2 callersMethodgenerate
( self, pipe, phrase_embeds=None, negative_phrase_embeds=None, image
if_adapter/if_adapter.py:134
↓ 1 callersMethod_norm
(self, x: torch.Tensor)
if_adapter/attention_processor.py:68
↓ 1 callersMethod_norm
(self, x: Tensor)
if_adapter/resampler.py:20
↓ 1 callersMethod_norm
(self, x: torch.Tensor)
if_adapter/resampler.py:35
↓ 1 callersFunctioncenter_crop_arr
(pil_image, image_size)
ifa_dataset.py:73
↓ 1 callersMethodcheck_inputs
( self, prompt, prompt_2, height, width, callback_steps,
if_adapter/sdxl_pipeline.py:606
↓ 1 callersMethodencode_image
(self, image, device, num_images_per_prompt, output_hidden_states=None)
if_adapter/sdxl_pipeline.py:512
↓ 1 callersFunctionencode_phrases
prompt_embeds: total_phrases_in_one_batch, extract_embedding_layers, l, dim1+dim2 pooled_prompt_embeds: total_phrases_in_one_batch, dim1
infer.py:38
↓ 1 callersFunctionencode_phrases
prompt_embeds: total_phrases_in_one_batch, extract_embedding_layers, l, dim1+dim2 pooled_prompt_embeds: total_phrases_in_one_batch, dim1
infer_loras.py:38
↓ 1 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
if_adapter/sdxl_pipeline.py:277
↓ 1 callersFunctiongenerate_attention_map_mask
(all_obj_attention_mask, latent_tokens_num)
if_adapter/resampler.py:79
↓ 1 callersMethodget_guidance_scale_embedding
See https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298 Args: w (`tor
if_adapter/sdxl_pipeline.py:764
↓ 1 callersMethodload_spd_adapter
(self, ckpt_path: str)
if_adapter/if_adapter.py:46
↓ 1 callersFunctionmain
()
infer.py:169
↓ 1 callersFunctionmain
()
infer_loras.py:168
↓ 1 callersMethodmap_construction
input: output: (B, heads, L, n_tokens, dim)
if_adapter/attention_processor.py:215
↓ 1 callersFunctionparse_args
()
infer.py:92
↓ 1 callersFunctionparse_args
()
infer_loras.py:92
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
if_adapter/sdxl_pipeline.py:589
↓ 1 callersMethodprepare_ip_adapter_image_embeds
( self, ip_adapter_image, ip_adapter_image_embeds, device, num_images_per_prompt, do_classifier_free_g
if_adapter/sdxl_pipeline.py:537
↓ 1 callersMethodprepare_latents
(self, batch_size, num_channels_latents, height, width, dtype, device, generator, latents=None)
if_adapter/sdxl_pipeline.py:703
↓ 1 callersFunctionprepare_phrase_embeddings
(batch, text_encoder, text_encoder_2, device, extract_embedding_layers)
infer.py:70
↓ 1 callersFunctionprepare_phrase_embeddings
(batch, text_encoder, text_encoder_2, device, extract_embedding_layers)
infer_loras.py:70
↓ 1 callersFunctionrescale_noise_cfg
Rescale `noise_cfg` according to `guidance_rescale`. Based on findings of [Common Diffusion Noise Schedules and Sample Steps are Flawed](http
if_adapter/sdxl_pipeline.py:91
↓ 1 callersFunctionretrieve_timesteps
Calls the scheduler's `set_timesteps` method and retrieves timesteps from the scheduler after the call. Handles custom timesteps. Any kwargs
if_adapter/sdxl_pipeline.py:106
↓ 1 callersMethodset_scale
(self, scale)
if_adapter/if_adapter.py:129
↓ 1 callersFunctionto_valid
(x0, y0, x1, y1, image_size, min_box_size)
ifa_dataset.py:26
↓ 1 callersMethodupcast_vae
(self)
if_adapter/sdxl_pipeline.py:743
FunctionFeedForward
(dim, mult=4)
if_adapter/resampler.py:59
Method__call__
( self, attn, hidden_states, encoder_hidden_states=None, attention_mas
if_adapter/attention_processor.py:92
Method__call__
( self, attn, hidden_states, encoder_hidden_states=None, attention_mas
if_adapter/attention_processor.py:261
Method__call__
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`, *optional*):
if_adapter/sdxl_pipeline.py:832
Method__call__
(self, x)
if_adapter/resampler.py:161
Method__getitem__
(self, idx)
ifa_dataset.py:150
Method__init__
(self, text_file, tokenizer, tokenizer_2, size=512, center_crop=True, random_flip=True, image_root_path="", ma
ifa_dataset.py:107
Method__init__
(self, unet, text_proj_model, pos_net, adapter_modules=None, device="cuda", num_tokens=4, ckpt_path=None)
if_adapter/if_adapter.py:28
Method__init__
(self, channels, r)
if_adapter/attention_processor.py:28
Method__init__
(self, channels, r)
if_adapter/attention_processor.py:48
Method__init__
(self, dim: int, eps: float = 1e-6)
if_adapter/attention_processor.py:63
Method__init__
( self, hidden_size=None, cross_attention_dim=None, )
if_adapter/attention_processor.py:83
Method__init__
(self, hidden_size, cross_attention_dim=None, num_heads=None, scale=1.0, num_tokens=4, enable_alpha=False, use
if_adapter/attention_processor.py:187
Method__init__
( self, vae: AutoencoderKL, text_encoder: CLIPTextModel, text_encoder_2: CLIPT
if_adapter/sdxl_pipeline.py:237
Method__init__
(self, dim: int, eps: float = 1e-6)
if_adapter/resampler.py:16
Method__init__
(self, dim: int, eps: float = 1e-6)
if_adapter/resampler.py:30
Method__init__
(self, dim, mult=4)
if_adapter/resampler.py:44
Method__init__
(self, *, dim, dim_head=64, heads=8)
if_adapter/resampler.py:94
Method__init__
(self, num_freqs=64, temperature=100)
if_adapter/resampler.py:151
Method__init__
(self, out_dim, fourier_freqs=64)
if_adapter/resampler.py:167
Method__len__
(self)
ifa_dataset.py:258
Methodclip_skip
(self)
if_adapter/sdxl_pipeline.py:803
Functioncollate_fn
(data)
ifa_dataset.py:261
Functionconvert_coco_box
(bbox, img_info)
ifa_dataset.py:15
Methodcross_attention_kwargs
(self)
if_adapter/sdxl_pipeline.py:814
Functiondecode_base64_to_pillow
(image_b64)
ifa_dataset.py:23
Functiondefault
(v, d)
if_adapter/attention_processor.py:10
Functiondefault
(v, d)
if_adapter/resampler.py:12
Methoddenoising_end
(self)
if_adapter/sdxl_pipeline.py:819
Methoddo_classifier_free_guidance
(self)
if_adapter/sdxl_pipeline.py:810
Methodextra_repr
(self)
if_adapter/resampler.py:25
Methodforward
(self, noisy_latents, timesteps, text_embeds, unet_added_cond_kwargs, phrase_embeds, all_obj_attentio
if_adapter/if_adapter.py:235
Methodforward
(self, x)
if_adapter/attention_processor.py:19
Methodforward
(self, x)
if_adapter/attention_processor.py:37
Methodforward
(self, x)
if_adapter/attention_processor.py:55
Methodforward
(self, x: torch.Tensor)
if_adapter/attention_processor.py:71
Methodforward
(self, x: Tensor)
if_adapter/resampler.py:22
Methodforward
(self, x: torch.Tensor)
if_adapter/resampler.py:38
Methodforward
(self, x: Tensor)
if_adapter/resampler.py:55
Methodforward
Args: x (torch.Tensor): image features shape (b, n_layers, l1, d) latent (torch.Tensor): latent featu
if_adapter/resampler.py:111
Methodforward
(self, boxes)
if_adapter/resampler.py:183
Methodforward
x: total_phrases_in_one_batch, extract_embedding_layers, l, dim1+dim2
if_adapter/resampler.py:230
Methodguidance_rescale
(self)
if_adapter/sdxl_pipeline.py:799
Methodguidance_scale
(self)
if_adapter/sdxl_pipeline.py:795
Methodinterrupt
(self)
if_adapter/sdxl_pipeline.py:827
Functionmasked_mean
(t, *, dim, mask=None)
if_adapter/resampler.py:249
Methodnum_timesteps
(self)
if_adapter/sdxl_pipeline.py:823
Functionrecalculate_box_and_verify_if_valid
x,y,w,h: the original annotation corresponding to the raw image size. trans_info: what resizing and cropping have been applied to the raw im
ifa_dataset.py:44
Methodtransform_image
(self, pil_image)
ifa_dataset.py:140