MCPcopy Create free account

hub / github.com/aitrepreneur/INSTID / functions

Functions42 in github.com/aitrepreneur/INSTID

↓ 4 callersMethodget_prompts_tokens_with_weights
Get prompt token ids and weights, this function works for both prompt and negative prompt Args: pipe (CLIPTokenizer)
pipeline_stable_diffusion_xl_instantid.py:217
↓ 4 callersMethodgroup_tokens_and_weights
Produce tokens and weights in groups and pad the missing tokens Args: token_ids (list) The token id
pipeline_stable_diffusion_xl_instantid.py:266
↓ 3 callersFunctionreshape_tensor
(x, heads)
ip_adapter/resampler.py:19
↓ 2 callersMethod__init__
( self, hidden_size=None, cross_attention_dim=None, )
ip_adapter/attention_processor.py:25
↓ 2 callersMethod_memory_efficient_attention_xformers
(self, query, key, value, attention_mask)
ip_adapter/attention_processor.py:213
↓ 2 callersFunctionconvert_from_image_to_cv2
(img: Image)
app.py:116
↓ 2 callersFunctiondraw_kps
(image_pil, kps, color_list=[(255,0,0), (0,255,0), (0,0,255), (255,255,0), (255,0,255)])
app.py:119
↓ 2 callersMethodget_weighted_text_embeddings_sdxl
This function can process long prompt with weights, no length limitation for Stable Diffusion XL Args: pipe
pipeline_stable_diffusion_xl_instantid.py:317
↓ 2 callersFunctionresize_img
(input_image, size=None, pad_to_max_side=False, mode=PIL.Image.BILINEAR, base_pixel_number=64)
app.py:442
↓ 1 callersFunctionFeedForward
(dim, mult=4)
ip_adapter/resampler.py:9
↓ 1 callersMethod__init__
( self, dim=1024, depth=8, dim_head=64, heads=16, num_qu
ip_adapter/resampler.py:79
↓ 1 callersMethod_encode_prompt_image_emb
(self, prompt_image_emb, device, dtype, do_classifier_free_guidance)
pipeline_stable_diffusion_xl_instantid.py:570
↓ 1 callersFunctionapply_style
(style_name: str, positive: str, negative: str = "")
app.py:170
↓ 1 callersFunctionconvert_from_cv2_to_image
(img: np.ndarray)
app.py:113
↓ 1 callersMethodcuda
(self, dtype=torch.float16, use_xformers=False)
pipeline_stable_diffusion_xl_instantid.py:488
↓ 1 callersFunctionget_example
()
app.py:78
↓ 1 callersMethodload_ip_adapter_instantid
(self, model_ckpt, image_emb_dim=512, num_tokens=16, scale=0.5)
pipeline_stable_diffusion_xl_instantid.py:508
↓ 1 callersMethodparse_prompt_attention
Parses a string with attention tokens and returns a list of pairs: text and its associated weight. Accepted tokens are: (a
pipeline_stable_diffusion_xl_instantid.py:116
↓ 1 callersMethodset_image_proj_model
(self, model_ckpt, image_emb_dim=512, num_tokens=16)
pipeline_stable_diffusion_xl_instantid.py:512
↓ 1 callersMethodset_ip_adapter
(self, model_ckpt, num_tokens, scale)
pipeline_stable_diffusion_xl_instantid.py:535
↓ 1 callersMethodset_ip_adapter_scale
(self, scale)
pipeline_stable_diffusion_xl_instantid.py:564
Method__call__
r""" The call function to the pipeline for generation. Args: prompt (`str` or `List[str]`, *optional*):
pipeline_stable_diffusion_xl_instantid.py:590
Method__call__
( self, attn, hidden_states, encoder_hidden_states=None, attentio
ip_adapter/attention_processor.py:32
Method__call__
( self, attn, hidden_states, encoder_hidden_states=None, attentio
ip_adapter/attention_processor.py:118
Method__call__
( self, attn, hidden_states, encoder_hidden_states=None, attentio
ip_adapter/attention_processor.py:236
Method__init__
(self)
pipeline_stable_diffusion_xl_instantid.py:113
Method__init__
(self)
ip_adapter/attention_processor.py:16
Method__init__
(self, hidden_size, cross_attention_dim=None, scale=1.0, num_tokens=4)
ip_adapter/attention_processor.py:107
Method__init__
( self, hidden_size=None, cross_attention_dim=None, )
ip_adapter/attention_processor.py:227
Method__init__
(self, *, dim, dim_head=64, heads=8)
ip_adapter/resampler.py:31
Functionclear_cuda_cache
()
app.py:247
Methodforward
Args: x (torch.Tensor): image features shape (b, n1, D) latent (torch.Tensor): latent features
ip_adapter/resampler.py:46
Methodforward
(self, x)
ip_adapter/resampler.py:110
Functiongenerate_image
(face_image, pose_image, prompt, negative_prompt, style_name, enhance_face_region, num_steps, identitynet_stre
app.py:175
Methodget_prompt_embeds
(self, *args, **kwargs)
pipeline_stable_diffusion_xl_instantid.py:480
Functionis_torch2_available
()
ip_adapter/utils.py:4
Methodmultiply_range
(start_position, multiplier)
pipeline_stable_diffusion_xl_instantid.py:170
Functionrandomize_seed_fn
(seed: int, randomize_seed: bool)
app.py:61
Functionremove_back_to_files
()
app.py:72
Functionremove_tips
()
app.py:75
Functionswap_to_gallery
(images)
app.py:66
Functionupload_example_to_gallery
(images, prompt, style, negative_prompt)
app.py:69