SYMBOL INDEX (101 symbols across 4 files) FILE: long_clip.py class SDLongClipModel (line 12) | class SDLongClipModel(torch.nn.Module, ClipTokenWeightEncoder): method __init__ (line 19) | def __init__(self, version="openai/clip-vit-large-patch14", device="cp... method freeze (line 51) | def freeze(self): method clip_layer (line 57) | def clip_layer(self, layer_idx): method reset_clip_layer (line 64) | def reset_clip_layer(self): method set_clip_options (line 68) | def set_clip_options(self, options): method reset_clip_options (line 77) | def reset_clip_options(self): method set_up_textual_embeddings (line 82) | def set_up_textual_embeddings(self, tokens, current_embeds): method forward (line 121) | def forward(self, tokens): method encode (line 154) | def encode(self, tokens): method load_sd (line 157) | def load_sd(self, sd): class SDLongTokenizer (line 164) | class SDLongTokenizer: method __init__ (line 165) | def __init__(self, max_length=248, pad_with_end=True, embedding_direct... method _try_get_embedding (line 189) | def _try_get_embedding(self, embedding_name:str): method tokenize_with_weights (line 203) | def tokenize_with_weights(self, text:str, return_word_ids=False): method untokenize (line 286) | def untokenize(self, token_weight_pair): function pad_tokens (line 289) | def pad_tokens(tokens,clip,add_token_num): function token_num (line 303) | def token_num(tokens): class SDXLLongClipModel (line 309) | class SDXLLongClipModel(torch.nn.Module): method __init__ (line 310) | def __init__(self): method set_clip_options (line 315) | def set_clip_options(self, options): method reset_clip_options (line 319) | def reset_clip_options(self): method encode_token_weights (line 323) | def encode_token_weights(self, token_weight_pairs): method load_sd (line 335) | def load_sd(self, sd): class SDXLLongTokenizer (line 341) | class SDXLLongTokenizer: method __init__ (line 342) | def __init__(self): method tokenize_with_weights (line 346) | def tokenize_with_weights(self, text:str, return_word_ids=False): method untokenize (line 358) | def untokenize(self, token_weight_pair): class LongCLIPFluxModel (line 361) | class LongCLIPFluxModel(torch.nn.Module): method __init__ (line 362) | def __init__(self): method set_clip_options (line 367) | def set_clip_options(self, options): method reset_clip_options (line 371) | def reset_clip_options(self): method encode_token_weights (line 375) | def encode_token_weights(self, token_weight_pairs): method load_sd (line 386) | def load_sd(self, sd): class LongCLIPFluxTokenizer (line 392) | class LongCLIPFluxTokenizer: method __init__ (line 393) | def __init__(self): method tokenize_with_weights (line 397) | def tokenize_with_weights(self, text: str, return_word_ids=False): method untokenize (line 413) | def untokenize(self, token_weight_pair): method state_dict (line 417) | def state_dict(self): class SeaArtLongXLClipMerge (line 420) | class SeaArtLongXLClipMerge: method INPUT_TYPES (line 422) | def INPUT_TYPES(cls): method do (line 431) | def do(self, clip_name, clip): class SeaArtLongClip (line 450) | class SeaArtLongClip: method INPUT_TYPES (line 452) | def INPUT_TYPES(cls): method do (line 460) | def do(self, clip_name): class LongCLIPTextEncodeFlux (line 472) | class LongCLIPTextEncodeFlux: method INPUT_TYPES (line 474) | def INPUT_TYPES(cls): method do (line 484) | def do(self, clip_name, clip): FILE: long_clip_model/longclip.py function _convert_image_to_rgb (line 36) | def _convert_image_to_rgb(image): function _transform (line 40) | def _transform(n_px): function load (line 51) | def load(name: str, device: Union[str, torch.device] = "cuda" if torch.c... function load_from_clip (line 144) | def load_from_clip(name: str, device: Union[str, torch.device] = "cuda" ... function only_tokenize (line 321) | def only_tokenize(texts: Union[str, List[str]]) -> Union[torch.IntTensor... function tokenize (line 330) | def tokenize(texts: Union[str, List[str]], context_length: int = 77*4-60... FILE: long_clip_model/model_longclip.py class Bottleneck (line 10) | class Bottleneck(nn.Module): method __init__ (line 13) | def __init__(self, inplanes, planes, stride=1): method forward (line 42) | def forward(self, x: torch.Tensor): class AttentionPool2d (line 58) | class AttentionPool2d(nn.Module): method __init__ (line 59) | def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, o... method forward (line 68) | def forward(self, x): class ModifiedResNet (line 94) | class ModifiedResNet(nn.Module): method __init__ (line 102) | def __init__(self, layers, output_dim, heads, input_resolution=224, wi... method _make_layer (line 129) | def _make_layer(self, planes, blocks, stride=1): method forward (line 138) | def forward(self, x): class LayerNorm (line 157) | class LayerNorm(nn.LayerNorm): method forward (line 160) | def forward(self, x: torch.Tensor): class QuickGELU (line 166) | class QuickGELU(nn.Module): method forward (line 167) | def forward(self, x: torch.Tensor): class ResidualAttentionBlock (line 171) | class ResidualAttentionBlock(nn.Module): method __init__ (line 172) | def __init__(self, d_model: int, n_head: int, attn_mask: torch.Tensor ... method attention (line 185) | def attention(self, x: torch.Tensor): method forward (line 189) | def forward(self, x: torch.Tensor): class Transformer (line 195) | class Transformer(nn.Module): method __init__ (line 196) | def __init__(self, width: int, layers: int, heads: int, attn_mask: tor... method forward (line 202) | def forward(self, x: torch.Tensor, intermediate_output=None, attn_mask... class VisionTransformer (line 215) | class VisionTransformer(nn.Module): method __init__ (line 216) | def __init__(self, input_resolution: int, patch_size: int, width: int,... method forward (line 232) | def forward(self, x: torch.Tensor): class CLIP (line 252) | class CLIP(nn.Module): method __init__ (line 253) | def __init__(self, method initialize_parameters (line 321) | def initialize_parameters(self): method build_attention_mask (line 350) | def build_attention_mask(self): method dtype (line 359) | def dtype(self): method get_input_embeddings (line 362) | def get_input_embeddings(self): method set_input_embeddings (line 365) | def set_input_embeddings(self, embeddings): method encode_image (line 368) | def encode_image(self, image): method encode_text (line 371) | def encode_text(self, text): method encode_text_full (line 387) | def encode_text_full(self, text): method forward (line 403) | def forward(self, input_tokens, attention_mask=None, intermediate_outp... function convert_weights (line 432) | def convert_weights(model: nn.Module): function build_model (line 456) | def build_model(state_dict: dict, load_from_clip: bool): FILE: long_clip_model/simple_tokenizer.py function default_bpe (line 11) | def default_bpe(): function bytes_to_unicode (line 16) | def bytes_to_unicode(): function get_pairs (line 38) | def get_pairs(word): function basic_clean (line 50) | def basic_clean(text): function whitespace_clean (line 56) | def whitespace_clean(text): class SimpleTokenizer (line 62) | class SimpleTokenizer(object): method __init__ (line 63) | def __init__(self, bpe_path: str = default_bpe()): method bpe (line 80) | def bpe(self, token): method encode (line 121) | def encode(self, text): method decode (line 129) | def decode(self, tokens):