SYMBOL INDEX (152 symbols across 18 files) FILE: chatbot/ace_inference.py function process_edit_image (line 26) | def process_edit_image(images, class TextEmbedding (line 83) | class TextEmbedding(nn.Module): method __init__ (line 84) | def __init__(self, embedding_shape): class RefinerInference (line 88) | class RefinerInference(DiffusionInference): method init_from_cfg (line 89) | def init_from_cfg(self, cfg): method encode_first_stage (line 101) | def encode_first_stage(self, x, **kwargs): method upscale_resize (line 113) | def upscale_resize(self, image, interpolation=T.InterpolationMode.BILI... method decode_first_stage (line 121) | def decode_first_stage(self, z): method noise_sample (line 128) | def noise_sample(self, num_samples, h, w, seed, device = None, dtype =... method refine (line 140) | def refine(self, class ACEInference (line 221) | class ACEInference(DiffusionInference): method __init__ (line 222) | def __init__(self, logger=None): method init_from_cfg (line 231) | def init_from_cfg(self, cfg): method encode_first_stage (line 292) | def encode_first_stage(self, x, **kwargs): method decode_first_stage (line 304) | def decode_first_stage(self, z): method __call__ (line 319) | def __call__(self, method cond_stage_embeddings (line 534) | def cond_stage_embeddings(self, prompt, edit_image, cont, cont_mask): FILE: chatbot/example.py function download_image (line 9) | def download_image(image, local_path=None): function blank_image (line 14) | def blank_image(): function get_examples (line 19) | def get_examples(cache_dir): FILE: chatbot/infer.py function process_edit_image (line 26) | def process_edit_image(images, class TextEmbedding (line 83) | class TextEmbedding(nn.Module): method __init__ (line 84) | def __init__(self, embedding_shape): class ACEInference (line 89) | class ACEInference(DiffusionInference): method __init__ (line 90) | def __init__(self, logger=None): method init_from_cfg (line 99) | def init_from_cfg(self, cfg): method encode_first_stage (line 146) | def encode_first_stage(self, x, **kwargs): method decode_first_stage (line 158) | def decode_first_stage(self, z): method __call__ (line 171) | def __call__(self, method cond_stage_embeddings (line 346) | def cond_stage_embeddings(self, prompt, edit_image, cont, cont_mask): FILE: chatbot/run_gradio.py class ChatBotUI (line 47) | class ChatBotUI(object): method __init__ (line 48) | def __init__(self, method create_ui (line 177) | def create_ui(self): method set_callbacks (line 523) | def set_callbacks(self, *args, **kwargs): method get_history (line 1274) | def get_history(self, history): method generate_random_string (line 1289) | def generate_random_string(self, length=20): method add_edited_image_to_history (line 1295) | def add_edited_image_to_history(self, image, mask_type, history, images): method add_uploaded_image_to_history (line 1356) | def add_uploaded_image_to_history(self, img, history, images): function run_gr (line 1401) | def run_gr(cfg): FILE: chatbot/utils.py function build_transform (line 12) | def build_transform(input_size): function find_closest_aspect_ratio (line 24) | def find_closest_aspect_ratio(aspect_ratio, target_ratios, width, height, function dynamic_preprocess (line 41) | def dynamic_preprocess(image, function load_image (line 83) | def load_image(image_file, input_size=448, max_num=12): FILE: modules/data/dataset/dataset.py class ACEDemoDataset (line 25) | class ACEDemoDataset(BaseDataset): method __init__ (line 81) | def __init__(self, cfg, logger=None): method __len__ (line 146) | def __len__(self): method _get (line 152) | def _get(self, index: int): method load_image (line 196) | def load_image(self, prefix, img_path, cvt_type=None): method image_preprocess (line 206) | def image_preprocess(self, method get_config_template (line 232) | def get_config_template(): method collate_fn (line 239) | def collate_fn(batch): FILE: modules/model/backbone/ace.py class DiTACE (line 29) | class DiTACE(BaseModel): method __init__ (line 87) | def __init__(self, cfg, logger): method load_pretrained_model (line 152) | def load_pretrained_model(self, pretrained_model): method forward (line 204) | def forward(self, method initialize_weights (line 336) | def initialize_weights(self): method dtype (line 365) | def dtype(self): method get_config_template (line 369) | def get_config_template(): FILE: modules/model/backbone/layers.py function drop_path (line 30) | def drop_path(x, drop_prob: float = 0., training: bool = False): function modulate (line 50) | def modulate(x, shift, scale, unsqueeze=False): class PatchEmbed (line 57) | class PatchEmbed(nn.Module): method __init__ (line 60) | def __init__( method forward (line 78) | def forward(self, x): class DropPath (line 86) | class DropPath(nn.Module): method __init__ (line 89) | def __init__(self, drop_prob=None): method forward (line 93) | def forward(self, x): class RMSNorm (line 97) | class RMSNorm(nn.Module): method __init__ (line 98) | def __init__(self, dim, eps=1e-6): method forward (line 104) | def forward(self, x): method _norm (line 107) | def _norm(self, x): class Mlp (line 111) | class Mlp(nn.Module): method __init__ (line 114) | def __init__(self, method forward (line 128) | def forward(self, x): class TimestepEmbedder (line 137) | class TimestepEmbedder(nn.Module): method __init__ (line 141) | def __init__(self, hidden_size, frequency_embedding_size=256): method timestep_embedding (line 151) | def timestep_embedding(t, dim, max_period=10000): method forward (line 173) | def forward(self, t): class DiTACEBlock (line 179) | class DiTACEBlock(nn.Module): method __init__ (line 180) | def __init__(self, method forward (line 226) | def forward(self, x, y, t, **kwargs): class MultiHeadAttention (line 244) | class MultiHeadAttention(nn.Module): method __init__ (line 245) | def __init__(self, method flash_attn (line 291) | def flash_attn(self, x, context=None, **kwargs): method forward (line 359) | def forward(self, x, context=None, **kwargs): class T2IFinalLayer (line 364) | class T2IFinalLayer(nn.Module): method __init__ (line 368) | def __init__(self, hidden_size, patch_size, out_channels): method forward (line 380) | def forward(self, x, t): FILE: modules/model/backbone/pos_embed.py function frame_pad (line 9) | def frame_pad(x, seq_len, shapes): function frame_unpad (line 26) | def frame_unpad(x, shapes): function rope_apply_multires (line 38) | def rope_apply_multires(x, x_lens, x_shapes, freqs, pad=True): function rope_params (line 75) | def rope_params(max_seq_len, dim, theta=10000): FILE: modules/model/diffusion/diffusions.py class ACEDiffusion (line 18) | class ACEDiffusion(object): method __init__ (line 29) | def __init__(self, cfg, logger=None): method init_params (line 35) | def init_params(self): method sample (line 53) | def sample(self, method loss (line 133) | def loss(self, method get_sampler (line 159) | def get_sampler(self, sampler): method __repr__ (line 185) | def __repr__(self) -> str: method get_config_template (line 189) | def get_config_template(): FILE: modules/model/diffusion/samplers.py function _i (line 9) | def _i(tensor, t, x): class DDIMSampler (line 20) | class DDIMSampler(BaseDiffusionSampler): method init_params (line 21) | def init_params(self): method preprare_sampler (line 27) | def preprare_sampler(self, method step (line 60) | def step(self, sampler_output): FILE: modules/model/diffusion/schedules.py class ScheduleOutput (line 10) | class ScheduleOutput(object): method add_custom_field (line 18) | def add_custom_field(self, key: str, value) -> None: class LinearScheduler (line 23) | class LinearScheduler(BaseNoiseScheduler): method init_params (line 26) | def init_params(self): method betas_to_sigmas (line 31) | def betas_to_sigmas(self, betas): method get_schedule (line 34) | def get_schedule(self): method add_noise (line 46) | def add_noise(self, x_0, noise=None, t=None, **kwargs): FILE: modules/model/embedder/embedder.py class ACETextEmbedder (line 25) | class ACETextEmbedder(BaseEmbedder): method __init__ (line 70) | def __init__(self, cfg, logger=None): method freeze (line 112) | def freeze(self): method forward (line 118) | def forward(self, tokens, return_mask=False, use_mask=True): method _clean (line 134) | def _clean(self, text): method encode (line 145) | def encode(self, text, return_mask=False, use_mask=True): method encode_list (line 167) | def encode_list(self, text_list, return_mask=True): method get_config_template (line 180) | def get_config_template(): FILE: modules/model/network/ldm_ace.py class TextEmbedding (line 23) | class TextEmbedding(nn.Module): method __init__ (line 24) | def __init__(self, embedding_shape): class LdmACE (line 30) | class LdmACE(LatentDiffusion): method __init__ (line 34) | def __init__(self, cfg, logger=None): method encode_first_stage (line 53) | def encode_first_stage(self, x, **kwargs): method decode_first_stage (line 61) | def decode_first_stage(self, z): method cond_stage_embeddings (line 67) | def cond_stage_embeddings(self, prompt, edit_image, cont, cont_mask): method limit_batch_data (line 85) | def limit_batch_data(self, batch_data_list, log_num): method forward_train (line 96) | def forward_train(self, method forward_test (line 186) | def forward_test(self, method get_config_template (line 348) | def get_config_template(): FILE: modules/model/utils/basic_utils.py function exists (line 11) | def exists(x): function default (line 15) | def default(val, d): function disabled_train (line 21) | def disabled_train(self, mode=True): function transfer_size (line 27) | def transfer_size(para_num): function count_params (line 44) | def count_params(model): function expand_dims_like (line 49) | def expand_dims_like(x, y): function unpack_tensor_into_imagelist (line 55) | def unpack_tensor_into_imagelist(image_tensor, shapes): function find_example (line 64) | def find_example(tensor_list, image_list): function pack_imagelist_into_tensor_v2 (line 75) | def pack_imagelist_into_tensor_v2(image_list): function to_device (line 95) | def to_device(inputs, strict=True): function check_list_of_list (line 103) | def check_list_of_list(ll): FILE: modules/solver/ace_solver.py class ACESolverV1 (line 16) | class ACESolverV1(LatentDiffusionSolver): method __init__ (line 17) | def __init__(self, cfg, logger=None): method save_results (line 21) | def save_results(self, results): method run_eval (line 65) | def run_eval(self): method run_test (line 95) | def run_test(self): method probe_data (line 126) | def probe_data(self): FILE: tools/run_inference.py function run_one_case (line 31) | def run_one_case(pipe, input_image, input_mask, edit_k, function run (line 63) | def run(): FILE: tools/run_train.py function run_task (line 21) | def run_task(cfg): function update_config (line 29) | def update_config(cfg): function run (line 45) | def run():