SYMBOL INDEX (466 symbols across 60 files) FILE: FaithDiff/create_FaithDiff_model.py function FaithDiff_pipeline (line 10) | def FaithDiff_pipeline(sdxl_path, VAE_FP16_path, FaithDiff_path, use_fp8... function create_bsrnet (line 35) | def create_bsrnet(bsrnet_path): FILE: FaithDiff/models/bsrnet_arch.py function initialize_weights (line 8) | def initialize_weights(net_l, scale=1): function make_layer (line 28) | def make_layer(block, n_layers): class ResidualDenseBlock_5C (line 35) | class ResidualDenseBlock_5C(nn.Module): method __init__ (line 36) | def __init__(self, nf=64, gc=32, bias=True): method forward (line 49) | def forward(self, x): class RRDB (line 58) | class RRDB(nn.Module): method __init__ (line 61) | def __init__(self, nf, gc=32): method forward (line 67) | def forward(self, x): class RRDBNet (line 74) | class RRDBNet(nn.Module): method __init__ (line 75) | def __init__(self, in_nc=3, out_nc=3, nf=64, nb=23, gc=32, sf=4): method check_image_size (line 93) | def check_image_size(self, x, scale): method forward (line 101) | def forward(self, x): method deg_remove (line 116) | def deg_remove(self, input, tile_size=512, tile_pad=16): FILE: FaithDiff/models/unet_2d_condition_vae_extension.py function zero_module (line 33) | def zero_module(module): class Encoder (line 39) | class Encoder(nn.Module): method __init__ (line 41) | def __init__( method to_rgb_init (line 110) | def to_rgb_init(self): method enable_tiling (line 118) | def enable_tiling(self): method encode (line 122) | def encode(self, sample: torch.FloatTensor) -> torch.FloatTensor: method blend_v (line 150) | def blend_v(self, a: torch.Tensor, b: torch.Tensor, blend_extent: int)... method blend_h (line 157) | def blend_h(self, a: torch.Tensor, b: torch.Tensor, blend_extent: int)... method tiled_encode (line 164) | def tiled_encode(self, x: torch.FloatTensor) -> torch.FloatTensor: method forward (line 192) | def forward(self, sample: torch.FloatTensor) -> torch.FloatTensor: class ControlNetConditioningEmbedding (line 199) | class ControlNetConditioningEmbedding(nn.Module): method __init__ (line 201) | def __init__( method forward (line 213) | def forward(self, conditioning): class QuickGELU (line 222) | class QuickGELU(nn.Module): method forward (line 224) | def forward(self, x: torch.Tensor): class LayerNorm (line 229) | class LayerNorm(nn.LayerNorm): method forward (line 231) | def forward(self, x: torch.Tensor): class ResidualAttentionBlock (line 238) | class ResidualAttentionBlock(nn.Module): method __init__ (line 240) | def __init__(self, d_model: int, n_head: int, attn_mask: torch.Tensor ... method attention (line 251) | def attention(self, x: torch.Tensor): method forward (line 256) | def forward(self, x: torch.Tensor): class UNet2DConditionOutput (line 264) | class UNet2DConditionOutput(BaseOutput): class UNet2DConditionModel (line 269) | class UNet2DConditionModel(OriginalUNet2DConditionModel, ConfigMixin, UN... method __init__ (line 274) | def __init__( method init_vae_encoder (line 389) | def init_vae_encoder(self, dtype): method init_information_transformer_layes (line 393) | def init_information_transformer_layes(self): method init_ControlNetConditioningEmbedding (line 400) | def init_ControlNetConditioningEmbedding(self, channel=512): method init_extra_weights (line 402) | def init_extra_weights(self): method load_additional_layers (line 405) | def load_additional_layers(self, dtype: Optional[torch.dtype] = torch.... method to (line 435) | def to(self, *args, **kwargs): method load_state_dict (line 444) | def load_state_dict(self, state_dict, strict=True): method forward (line 480) | def forward( FILE: FaithDiff/pipelines/pipeline_FaithDiff_tlc.py function img2tensor (line 74) | def img2tensor(imgs, bgr2rgb=True, float32=True): class LocalAttention (line 101) | class LocalAttention: method __init__ (line 104) | def __init__(self, kernel_size=None, overlap=0.5): method grids_list (line 115) | def grids_list(self, x): method grids (line 160) | def grids(self, x): method _gaussian_weights (line 207) | def _gaussian_weights(self, tile_width, tile_height): method grids_inverse (line 230) | def grids_inverse(self, outs): method _pad (line 254) | def _pad(self, x): method forward (line 271) | def forward(self, x): function rescale_noise_cfg (line 286) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): function retrieve_latents (line 308) | def retrieve_latents( function retrieve_timesteps (line 331) | def retrieve_timesteps( class FaithDiffStableDiffusionXLPipeline (line 374) | class FaithDiffStableDiffusionXLPipeline( method __init__ (line 445) | def __init__( method encode_prompt (line 485) | def encode_prompt( method prepare_extra_step_kwargs (line 720) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 737) | def check_inputs( method prepare_latents (line 820) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method upcast_vae (line 837) | def upcast_vae(self): method get_guidance_scale_embedding (line 858) | def get_guidance_scale_embedding( method set_encoder_tile_settings (line 888) | def set_encoder_tile_settings(self, method enable_vae_tiling (line 898) | def enable_vae_tiling(self): method disable_vae_tiling (line 907) | def disable_vae_tiling(self): method guidance_scale (line 916) | def guidance_scale(self): method guidance_rescale (line 920) | def guidance_rescale(self): method clip_skip (line 924) | def clip_skip(self): method do_classifier_free_guidance (line 931) | def do_classifier_free_guidance(self): method cross_attention_kwargs (line 935) | def cross_attention_kwargs(self): method denoising_end (line 939) | def denoising_end(self): method num_timesteps (line 943) | def num_timesteps(self): method interrupt (line 947) | def interrupt(self): method prepare_image_latents (line 950) | def prepare_image_latents( method __call__ (line 1008) | def __call__( FILE: FaithDiff/pipelines/pipeline_output.py class FaithDiffStableDiffusionXLPipelineOutput (line 11) | class FaithDiffStableDiffusionXLPipelineOutput(BaseOutput): class FlaxFaithDiffStableDiffusionXLPipelineOutput (line 28) | class FlaxFaithDiffStableDiffusionXLPipelineOutput(BaseOutput): FILE: FaithDiff/training_utils.py function set_seed (line 40) | def set_seed(seed: int): function compute_snr (line 60) | def compute_snr(noise_scheduler, timesteps): function resolve_interpolation_mode (line 97) | def resolve_interpolation_mode(interpolation_type: str): function compute_dream_and_update_latents (line 141) | def compute_dream_and_update_latents( function unet_lora_state_dict (line 195) | def unet_lora_state_dict(unet: UNet2DConditionModel) -> Dict[str, torch.... function cast_training_params (line 214) | def cast_training_params(model: Union[torch.nn.Module, List[torch.nn.Mod... function _set_state_dict_into_text_encoder (line 231) | def _set_state_dict_into_text_encoder( function compute_density_for_timestep_sampling (line 250) | def compute_density_for_timestep_sampling( function compute_loss_weighting_for_sd3 (line 272) | def compute_loss_weighting_for_sd3(weighting_scheme: str, sigmas=None): function free_memory (line 290) | def free_memory(): function should_update_ema (line 305) | def should_update_ema(args, step): class EMAModel (line 316) | class EMAModel: method __init__ (line 321) | def __init__( method save_state_dict (line 414) | def save_state_dict(self, path: str) -> None: method load_state_dict (line 429) | def load_state_dict(self, path: str) -> None: method from_pretrained (line 470) | def from_pretrained(cls, path, model_cls) -> "EMAModel": method save_pretrained (line 481) | def save_pretrained(self, path, max_shard_size: str = "10GB"): method get_decay (line 500) | def get_decay(self, optimization_step: int = None) -> float: method step (line 523) | def step(self, parameters: Iterable[torch.nn.Parameter], global_step: ... method copy_to (line 633) | def copy_to(self, parameters: Iterable[torch.nn.Parameter]) -> None: method pin_memory (line 655) | def pin_memory(self) -> None: method to (line 670) | def to(self, *args, **kwargs): method cuda (line 675) | def cuda(self, device=None): method cpu (line 678) | def cpu(self): method state_dict (line 681) | def state_dict( method store (line 704) | def store(self, parameters: Iterable[torch.nn.Parameter]) -> None: method restore (line 710) | def restore(self, parameters: Iterable[torch.nn.Parameter]) -> None: method parameter_count (line 731) | def parameter_count(self) -> int: method named_children (line 736) | def named_children(self): method children (line 740) | def children(self): method modules (line 743) | def modules(self): method named_modules (line 746) | def named_modules(self, memo=None, prefix=""): method parameters (line 749) | def parameters(self, recurse=True): method named_parameters (line 752) | def named_parameters(self, prefix="", recurse=True): method buffers (line 757) | def buffers(self, recurse=True): method named_buffers (line 760) | def named_buffers(self, prefix="", recurse=True): method train (line 763) | def train(self, mode=True): method eval (line 767) | def eval(self): method zero_grad (line 770) | def zero_grad(self): FILE: dataloader/Realesrgan_offline_dataset.py function ordered_yaml (line 26) | def ordered_yaml(): function opt_parse (line 50) | def opt_parse(opt_path): function convert_image_to_fn (line 57) | def convert_image_to_fn(img_type, image, minsize=512, eps=0.02): function exists (line 66) | def exists(x): class LocalImageDataset (line 70) | class LocalImageDataset(data.Dataset): method __init__ (line 71) | def __init__(self, method __getitem__ (line 144) | def __getitem__(self, index): method __len__ (line 276) | def __len__(self): FILE: dataloader/realesrgan.py function ordered_yaml (line 22) | def ordered_yaml(): function opt_parse (line 46) | def opt_parse(opt_path): class RealESRGAN_degradation (line 53) | class RealESRGAN_degradation(object): method __init__ (line 54) | def __init__(self, opt_name='params_realesrgan.yml', device='cpu'): method color_jitter_pt (line 88) | def color_jitter_pt(self, img, brightness, contrast, saturation, hue): method random_augment (line 108) | def random_augment(self, img_gt): method random_kernels (line 129) | def random_kernels(self): method degrade_process (line 191) | def degrade_process(self, img_gt, resize_bak=False, seed=42): FILE: gradio_demo.py function caption_process (line 59) | def caption_process( function clear_result (line 69) | def clear_result(): function randomize_seed_fn (line 72) | def randomize_seed_fn(generation_seed: int, randomize_seed: bool) -> int: function process (line 78) | def process( FILE: llava/conversation.py class SeparatorStyle (line 9) | class SeparatorStyle(Enum): class Conversation (line 19) | class Conversation: method get_prompt (line 32) | def get_prompt(self): method append_message (line 109) | def append_message(self, role, message): method process_image (line 112) | def process_image(self, image, image_process_mode, return_pil=False, i... method get_images (line 152) | def get_images(self, return_pil=False): method to_gradio_chatbot (line 162) | def to_gradio_chatbot(self): method copy (line 180) | def copy(self): method dict (line 191) | def dict(self): FILE: llava/eval/eval_gpt_review.py function get_eval (line 13) | def get_eval(content: str, max_tokens: int): function parse_score (line 39) | def parse_score(review): FILE: llava/eval/eval_gpt_review_bench.py function get_eval (line 11) | def get_eval(content: str, max_tokens: int): function parse_score (line 36) | def parse_score(review): FILE: llava/eval/eval_gpt_review_visual.py function get_eval (line 11) | def get_eval(content: str, max_tokens: int): function parse_score (line 36) | def parse_score(review): FILE: llava/eval/eval_pope.py function eval_pope (line 5) | def eval_pope(answers, label_file): FILE: llava/eval/eval_science_qa.py function get_args (line 8) | def get_args(): function convert_caps (line 19) | def convert_caps(results): function get_pred_idx (line 28) | def get_pred_idx(prediction, choices, options): FILE: llava/eval/eval_science_qa_gpt4.py function get_args (line 9) | def get_args(): function convert_caps (line 19) | def convert_caps(results): function get_pred_idx (line 28) | def get_pred_idx(prediction, choices, options): FILE: llava/eval/eval_science_qa_gpt4_requery.py function get_args (line 9) | def get_args(): function convert_caps (line 21) | def convert_caps(results): function get_pred_idx (line 30) | def get_pred_idx(prediction, choices, options): FILE: llava/eval/eval_textvqa.py function get_args (line 9) | def get_args(): function prompt_processor (line 17) | def prompt_processor(prompt): function eval_single (line 35) | def eval_single(annotation_file, result_file): FILE: llava/eval/generate_webpage_data_from_table.py function read_jsonl (line 10) | def read_jsonl(path: str, key: str=None): function trim_hanging_lines (line 23) | def trim_hanging_lines(s: str, n: int) -> str: FILE: llava/eval/m4c_evaluator.py class EvalAIAnswerProcessor (line 7) | class EvalAIAnswerProcessor: method __init__ (line 178) | def __init__(self, *args, **kwargs): method word_tokenize (line 181) | def word_tokenize(self, word): method process_punctuation (line 186) | def process_punctuation(self, in_text): method process_digit_article (line 198) | def process_digit_article(self, in_text): method __call__ (line 213) | def __call__(self, item): class TextVQAAccuracyEvaluator (line 221) | class TextVQAAccuracyEvaluator: method __init__ (line 222) | def __init__(self): method _compute_answer_scores (line 225) | def _compute_answer_scores(self, raw_answers): method eval_pred_list (line 248) | def eval_pred_list(self, pred_list): class STVQAAccuracyEvaluator (line 260) | class STVQAAccuracyEvaluator: method __init__ (line 261) | def __init__(self): method eval_pred_list (line 264) | def eval_pred_list(self, pred_list): class STVQAANLSEvaluator (line 276) | class STVQAANLSEvaluator: method __init__ (line 277) | def __init__(self): method get_anls (line 282) | def get_anls(self, s1, s2): method eval_pred_list (line 289) | def eval_pred_list(self, pred_list): class TextCapsBleu4Evaluator (line 301) | class TextCapsBleu4Evaluator: method __init__ (line 302) | def __init__(self): method eval_pred_list (line 321) | def eval_pred_list(self, pred_list): FILE: llava/eval/model_qa.py function eval_model (line 14) | def eval_model(model_name, questions_file, answers_file): FILE: llava/eval/model_vqa.py function split_list (line 18) | def split_list(lst, n): function get_chunk (line 24) | def get_chunk(lst, n, k): function eval_model (line 29) | def eval_model(args): FILE: llava/eval/model_vqa_loader.py function split_list (line 19) | def split_list(lst, n): function get_chunk (line 25) | def get_chunk(lst, n, k): class CustomDataset (line 31) | class CustomDataset(Dataset): method __init__ (line 32) | def __init__(self, questions, image_folder, tokenizer, image_processor... method __getitem__ (line 39) | def __getitem__(self, index): method __len__ (line 60) | def __len__(self): function collate_fn (line 64) | def collate_fn(batch): function create_data_loader (line 72) | def create_data_loader(questions, image_folder, tokenizer, image_process... function eval_model (line 79) | def eval_model(args): FILE: llava/eval/model_vqa_mmbench.py function split_list (line 22) | def split_list(lst, n): function get_chunk (line 28) | def get_chunk(lst, n, k): function is_none (line 33) | def is_none(value): function get_options (line 44) | def get_options(row, options): function eval_model (line 54) | def eval_model(args): FILE: llava/eval/model_vqa_science.py function split_list (line 18) | def split_list(lst, n): function get_chunk (line 24) | def get_chunk(lst, n, k): function eval_model (line 29) | def eval_model(args): FILE: llava/eval/qa_baseline_gpt35.py function get_answer (line 16) | def get_answer(question_id: int, question: str, max_tokens: int): FILE: llava/eval/run_llava.py function image_parser (line 28) | def image_parser(args): function load_image (line 33) | def load_image(image_file): function load_images (line 42) | def load_images(image_files): function eval_model (line 50) | def eval_model(args): FILE: llava/eval/summarize_gpt_review.py function parse_args (line 9) | def parse_args(): FILE: llava/eval/webpage/script.js function text2Markdown (line 35) | function text2Markdown(text) { function capitalizeFirstChar (line 41) | function capitalizeFirstChar(str) { function updateQuestionSelect (line 48) | function updateQuestionSelect(question_id) { function updateModelSelect (line 64) | function updateModelSelect() { function populateModels (line 70) | function populateModels(models) { function populateQuestions (line 81) | function populateQuestions(questions) { function displayQuestion (line 110) | function displayQuestion(index) { function displayAnswers (line 116) | function displayAnswers(index) { function switchQuestionAndCategory (line 203) | function switchQuestionAndCategory() { function updateExpandButtonVisibility (line 226) | function updateExpandButtonVisibility(card) { FILE: llava/llm_agent.py class LLavaAgent (line 18) | class LLavaAgent: method __init__ (line 19) | def __init__(self, model_path, device='cuda', conv_mode='vicuna_v1', l... method update_qs (line 49) | def update_qs(self, qs=None): method gen_image_caption (line 65) | def gen_image_caption(self, imgs, temperature=0.2, top_p=0.7, num_beam... FILE: llava/mm_utils.py function select_best_resolution (line 12) | def select_best_resolution(original_size, possible_resolutions): function resize_and_pad_image (line 42) | def resize_and_pad_image(image, target_resolution): function divide_to_patches (line 77) | def divide_to_patches(image, patch_size): function get_anyres_image_grid_shape (line 99) | def get_anyres_image_grid_shape(image_size, grid_pinpoints, patch_size): function process_anyres_image (line 119) | def process_anyres_image(image, processor, grid_pinpoints): function load_image_from_base64 (line 148) | def load_image_from_base64(image): function expand2square (line 152) | def expand2square(pil_img, background_color): function process_images (line 166) | def process_images(images, image_processor, model_cfg): function tokenizer_image_token (line 185) | def tokenizer_image_token(prompt, tokenizer, image_token_index=IMAGE_TOK... function get_model_name_from_path (line 207) | def get_model_name_from_path(model_path): class KeywordsStoppingCriteria (line 215) | class KeywordsStoppingCriteria(StoppingCriteria): method __init__ (line 216) | def __init__(self, keywords, tokenizer, input_ids): method call_for_batch (line 230) | def call_for_batch(self, output_ids: torch.LongTensor, scores: torch.F... method __call__ (line 243) | def __call__(self, output_ids: torch.LongTensor, scores: torch.FloatTe... FILE: llava/model/apply_delta.py function apply_delta (line 13) | def apply_delta(base_model_path, target_model_path, delta_path): FILE: llava/model/builder.py function load_pretrained_model (line 26) | def load_pretrained_model(model_path, model_base, model_name, load_8bit=... FILE: llava/model/consolidate.py function consolidate_ckpt (line 13) | def consolidate_ckpt(src_path, dst_path): FILE: llava/model/language_model/llava_llama.py class LlavaConfig (line 30) | class LlavaConfig(LlamaConfig): class LlavaLlamaModel (line 34) | class LlavaLlamaModel(LlavaMetaModel, LlamaModel): method __init__ (line 37) | def __init__(self, config: LlamaConfig): class LlavaLlamaForCausalLM (line 41) | class LlavaLlamaForCausalLM(LlamaForCausalLM, LlavaMetaForCausalLM): method __init__ (line 44) | def __init__(self, config): method get_model (line 54) | def get_model(self): method forward (line 57) | def forward( method generate (line 106) | def generate( method prepare_inputs_for_generation (line 145) | def prepare_inputs_for_generation(self, input_ids, past_key_values=None, FILE: llava/model/language_model/llava_mistral.py class LlavaMistralConfig (line 31) | class LlavaMistralConfig(MistralConfig): class LlavaMistralModel (line 35) | class LlavaMistralModel(LlavaMetaModel, MistralModel): method __init__ (line 38) | def __init__(self, config: MistralConfig): class LlavaMistralForCausalLM (line 42) | class LlavaMistralForCausalLM(MistralForCausalLM, LlavaMetaForCausalLM): method __init__ (line 45) | def __init__(self, config): method get_model (line 54) | def get_model(self): method forward (line 57) | def forward( method generate (line 105) | def generate( method prepare_inputs_for_generation (line 144) | def prepare_inputs_for_generation(self, input_ids, past_key_values=None, FILE: llava/model/language_model/llava_mpt.py class LlavaMptConfig (line 25) | class LlavaMptConfig(MptConfig): class LlavaMptModel (line 29) | class LlavaMptModel(LlavaMetaModel, MptModel): method __init__ (line 32) | def __init__(self, config: MptConfig): method embed_tokens (line 36) | def embed_tokens(self, x): class LlavaMptForCausalLM (line 40) | class LlavaMptForCausalLM(MptForCausalLM, LlavaMetaForCausalLM): method __init__ (line 44) | def __init__(self, config): method get_model (line 53) | def get_model(self): method _set_gradient_checkpointing (line 56) | def _set_gradient_checkpointing(self, module, value=False): method forward (line 60) | def forward( method prepare_inputs_for_generation (line 87) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... FILE: llava/model/llava_arch.py class LlavaMetaModel (line 29) | class LlavaMetaModel: method __init__ (line 31) | def __init__(self, config): method get_vision_tower (line 43) | def get_vision_tower(self): method initialize_vision_modules (line 49) | def initialize_vision_modules(self, model_args, fsdp=None): function unpad_image (line 100) | def unpad_image(tensor, original_size): class LlavaMetaForCausalLM (line 131) | class LlavaMetaForCausalLM(ABC): method get_model (line 134) | def get_model(self): method get_vision_tower (line 137) | def get_vision_tower(self): method encode_images (line 140) | def encode_images(self, images): method prepare_inputs_labels_for_multimodal (line 145) | def prepare_inputs_labels_for_multimodal( method initialize_vision_tokenizer (line 326) | def initialize_vision_tokenizer(self, model_args, tokenizer): FILE: llava/model/make_delta.py function make_delta (line 13) | def make_delta(base_model_path, target_model_path, delta_path, hub_repo_... FILE: llava/model/multimodal_encoder/builder.py function build_vision_tower (line 5) | def build_vision_tower(vision_tower_cfg, **kwargs): FILE: llava/model/multimodal_encoder/clip_encoder.py class CLIPVisionTower (line 7) | class CLIPVisionTower(nn.Module): method __init__ (line 8) | def __init__(self, vision_tower, args, delay_load=False): method load_model (line 24) | def load_model(self, device_map=None): method feature_select (line 35) | def feature_select(self, image_forward_outs): method forward (line 46) | def forward(self, images): method dummy_feature (line 60) | def dummy_feature(self): method dtype (line 64) | def dtype(self): method device (line 68) | def device(self): method config (line 72) | def config(self): method hidden_size (line 79) | def hidden_size(self): method num_patches_per_side (line 83) | def num_patches_per_side(self): method num_patches (line 87) | def num_patches(self): FILE: llava/model/multimodal_projector/builder.py class IdentityMap (line 6) | class IdentityMap(nn.Module): method __init__ (line 7) | def __init__(self): method forward (line 10) | def forward(self, x, *args, **kwargs): method config (line 14) | def config(self): class SimpleResBlock (line 18) | class SimpleResBlock(nn.Module): method __init__ (line 19) | def __init__(self, channels): method forward (line 28) | def forward(self, x): function build_vision_projector (line 33) | def build_vision_projector(config, delay_load=False, **kwargs): FILE: llava/model/utils.py function auto_upgrade (line 4) | def auto_upgrade(config): FILE: llava/serve/cli.py function load_image (line 18) | def load_image(image_file): function main (line 27) | def main(args): FILE: llava/serve/controller.py class DispatchMethod (line 28) | class DispatchMethod(Enum): method from_str (line 33) | def from_str(cls, name): class WorkerInfo (line 43) | class WorkerInfo: function heart_beat_controller (line 51) | def heart_beat_controller(controller): class Controller (line 57) | class Controller: method __init__ (line 58) | def __init__(self, dispatch_method: str): method register_worker (line 69) | def register_worker(self, worker_name: str, check_heart_beat: bool, method get_worker_status (line 88) | def get_worker_status(self, worker_name: str): method remove_worker (line 101) | def remove_worker(self, worker_name: str): method refresh_all_workers (line 104) | def refresh_all_workers(self): method list_models (line 112) | def list_models(self): method get_worker_address (line 120) | def get_worker_address(self, model_name: str): method receive_heart_beat (line 173) | def receive_heart_beat(self, worker_name: str, queue_length: int): method remove_stable_workers_by_expiration (line 183) | def remove_stable_workers_by_expiration(self): method worker_api_generate_stream (line 193) | def worker_api_generate_stream(self, params): method worker_api_get_status (line 220) | def worker_api_get_status(self): function register_worker (line 243) | async def register_worker(request: Request): function refresh_all_workers (line 251) | async def refresh_all_workers(): function list_models (line 256) | async def list_models(): function get_worker_address (line 262) | async def get_worker_address(request: Request): function receive_heart_beat (line 269) | async def receive_heart_beat(request: Request): function worker_api_generate_stream (line 277) | async def worker_api_generate_stream(request: Request): function worker_api_get_status (line 284) | async def worker_api_get_status(request: Request): FILE: llava/serve/gradio_web_server.py function get_conv_log_filename (line 32) | def get_conv_log_filename(): function get_model_list (line 38) | def get_model_list(): function load_demo (line 58) | def load_demo(url_params, request: gr.Request): function load_demo_refresh_model_list (line 71) | def load_demo_refresh_model_list(request: gr.Request): function vote_last_response (line 82) | def vote_last_response(state, vote_type, model_selector, request: gr.Req... function upvote_last_response (line 94) | def upvote_last_response(state, model_selector, request: gr.Request): function downvote_last_response (line 100) | def downvote_last_response(state, model_selector, request: gr.Request): function flag_last_response (line 106) | def flag_last_response(state, model_selector, request: gr.Request): function regenerate (line 112) | def regenerate(state, image_process_mode, request: gr.Request): function clear_history (line 122) | def clear_history(request: gr.Request): function add_text (line 128) | def add_text(state, text, image, image_process_mode, request: gr.Request): function http_bot (line 154) | def http_bot(state, model_selector, temperature, top_p, max_new_tokens, ... function build_demo (line 315) | def build_demo(embed_mode, cur_dir=None, concurrency_count=10): FILE: llava/serve/model_worker.py function heart_beat_worker (line 37) | def heart_beat_worker(controller): class ModelWorker (line 44) | class ModelWorker: method __init__ (line 45) | def __init__(self, controller_addr, worker_addr, method register_to_controller (line 75) | def register_to_controller(self): method send_heart_beat (line 87) | def send_heart_beat(self): method get_queue_length (line 108) | def get_queue_length(self): method get_status (line 115) | def get_status(self): method generate_stream (line 123) | def generate_stream(self, params): method generate_stream_gate (line 195) | def generate_stream_gate(self, params): function release_model_semaphore (line 225) | def release_model_semaphore(fn=None): function generate_stream (line 232) | async def generate_stream(request: Request): function get_status (line 248) | async def get_status(request: Request): FILE: llava/serve/sglang_worker.py function heart_beat_worker (line 38) | def heart_beat_worker(controller): function pipeline (line 45) | def pipeline(s, prompt, max_tokens): class ModelWorker (line 54) | class ModelWorker: method __init__ (line 55) | def __init__(self, controller_addr, worker_addr, sgl_endpoint, method register_to_controller (line 85) | def register_to_controller(self): method send_heart_beat (line 97) | def send_heart_beat(self): method get_queue_length (line 118) | def get_queue_length(self): method get_status (line 125) | def get_status(self): method generate_stream (line 132) | async def generate_stream(self, params): method generate_stream_gate (line 172) | async def generate_stream_gate(self, params): function release_model_semaphore (line 195) | def release_model_semaphore(fn=None): function generate_stream (line 202) | async def generate_stream(request: Request): function get_status (line 218) | async def get_status(request: Request): FILE: llava/serve/test_message.py function main (line 9) | def main(): FILE: llava/train/llama_flash_attn_monkey_patch.py function forward (line 16) | def forward( function _prepare_decoder_attention_mask (line 98) | def _prepare_decoder_attention_mask( function replace_llama_attn_with_flash_attn (line 105) | def replace_llama_attn_with_flash_attn(): FILE: llava/train/llama_xformers_attn_monkey_patch.py function replace_llama_attn_with_xformers_attn (line 19) | def replace_llama_attn_with_xformers_attn(): function xformers_forward (line 23) | def xformers_forward( FILE: llava/train/llava_trainer.py function maybe_zero_3 (line 18) | def maybe_zero_3(param, ignore_status=False, name=None): function get_mm_adapter_state_maybe_zero_3 (line 32) | def get_mm_adapter_state_maybe_zero_3(named_params, keys_to_match): function split_to_even_chunks (line 38) | def split_to_even_chunks(indices, lengths, num_chunks): function get_modality_length_grouped_indices (line 60) | def get_modality_length_grouped_indices(lengths, batch_size, world_size,... function get_length_grouped_indices (line 88) | def get_length_grouped_indices(lengths, batch_size, world_size, generato... class LengthGroupedSampler (line 99) | class LengthGroupedSampler(Sampler): method __init__ (line 105) | def __init__( method __len__ (line 122) | def __len__(self): method __iter__ (line 125) | def __iter__(self): class LLaVATrainer (line 133) | class LLaVATrainer(Trainer): method _get_train_sampler (line 135) | def _get_train_sampler(self) -> Optional[torch.utils.data.Sampler]: method create_optimizer (line 150) | def create_optimizer(self): method _save_checkpoint (line 230) | def _save_checkpoint(self, model, trial, metrics=None): method _save (line 251) | def _save(self, output_dir: Optional[str] = None, state_dict=None): FILE: llava/train/train.py function rank0_print (line 44) | def rank0_print(*args): class ModelArguments (line 54) | class ModelArguments: class DataArguments (line 70) | class DataArguments: class TrainingArguments (line 80) | class TrainingArguments(transformers.TrainingArguments): function maybe_zero_3 (line 115) | def maybe_zero_3(param, ignore_status=False, name=None): function get_peft_state_maybe_zero_3 (line 130) | def get_peft_state_maybe_zero_3(named_params, bias): function get_peft_state_non_lora_maybe_zero_3 (line 155) | def get_peft_state_non_lora_maybe_zero_3(named_params, require_grad_only... function get_mm_adapter_state_maybe_zero_3 (line 163) | def get_mm_adapter_state_maybe_zero_3(named_params, keys_to_match): function find_all_linear_names (line 169) | def find_all_linear_names(model): function safe_save_model_for_hf_trainer (line 185) | def safe_save_model_for_hf_trainer(trainer: transformers.Trainer, function smart_tokenizer_and_embedding_resize (line 224) | def smart_tokenizer_and_embedding_resize( function _tokenize_fn (line 249) | def _tokenize_fn(strings: Sequence[str], function _mask_targets (line 276) | def _mask_targets(target, tokenized_lens, speakers): function _add_speaker_and_signal (line 287) | def _add_speaker_and_signal(header, source, get_conversation=True): function preprocess_multimodal (line 308) | def preprocess_multimodal( function preprocess_llama_2 (line 332) | def preprocess_llama_2( function preprocess_v1 (line 414) | def preprocess_v1( function preprocess_mpt (line 500) | def preprocess_mpt( function preprocess_plain (line 588) | def preprocess_plain( function preprocess (line 610) | def preprocess( class LazySupervisedDataset (line 658) | class LazySupervisedDataset(Dataset): method __init__ (line 661) | def __init__(self, data_path: str, method __len__ (line 672) | def __len__(self): method lengths (line 676) | def lengths(self): method modality_lengths (line 684) | def modality_lengths(self): method __getitem__ (line 692) | def __getitem__(self, i) -> Dict[str, torch.Tensor]: class DataCollatorForSupervisedDataset (line 743) | class DataCollatorForSupervisedDataset(object): method __call__ (line 748) | def __call__(self, instances: Sequence[Dict]) -> Dict[str, torch.Tensor]: function make_supervised_data_module (line 776) | def make_supervised_data_module(tokenizer: transformers.PreTrainedTokeni... function train (line 788) | def train(attn_implementation=None): FILE: llava/utils.py function build_logger (line 17) | def build_logger(logger_name, logger_filename): class StreamToLogger (line 60) | class StreamToLogger(object): method __init__ (line 64) | def __init__(self, logger, log_level=logging.INFO): method __getattr__ (line 70) | def __getattr__(self, attr): method write (line 73) | def write(self, buf): method flush (line 87) | def flush(self): function disable_torch_init (line 93) | def disable_torch_init(): function violates_moderation (line 102) | def violates_moderation(text): function pretty_print_semaphore (line 123) | def pretty_print_semaphore(semaphore): FILE: test_metrics.py function get_timestamp (line 19) | def get_timestamp(): function setup_logger (line 23) | def setup_logger(logger_name, root, phase, level=logging.INFO, screen=Fa... function dict2str (line 53) | def dict2str(opt, indent=1): function main (line 74) | def main(): FILE: train_SDXL_stage_1.py function ordered_yaml (line 74) | def ordered_yaml(): function image_grid (line 97) | def image_grid(imgs, rows, cols): function image_grid (line 109) | def image_grid(imgs, rows, cols): function get_concat_h (line 121) | def get_concat_h(im1, im2): function log_validation (line 127) | def log_validation(unet, args, accelerator, weight_dtype, step): function parse_args (line 200) | def parse_args(): function convert_to_np (line 547) | def convert_to_np(image, resolution): function main (line 553) | def main(): FILE: train_SDXL_stage_2.py function ordered_yaml (line 74) | def ordered_yaml(): function image_grid (line 97) | def image_grid(imgs, rows, cols): function image_grid (line 108) | def image_grid(imgs, rows, cols): function get_concat_h (line 119) | def get_concat_h(im1, im2): function log_validation (line 125) | def log_validation(unet, args, accelerator, weight_dtype, step): function parse_args (line 207) | def parse_args(): function convert_to_np (line 559) | def convert_to_np(image, resolution): function main (line 565) | def main(): FILE: utils/color_fix.py function adain_color_fix (line 14) | def adain_color_fix(target: Image, source: Image): function wavelet_color_fix (line 29) | def wavelet_color_fix(target: Image, source: Image): function calc_mean_std (line 44) | def calc_mean_std(feat: Tensor, eps=1e-5): function adaptive_instance_normalization (line 59) | def adaptive_instance_normalization(content_feat:Tensor, style_feat:Tens... function wavelet_blur (line 73) | def wavelet_blur(image: Tensor, radius: int): function wavelet_decomposition (line 94) | def wavelet_decomposition(image: Tensor, levels=5): function wavelet_reconstruction (line 108) | def wavelet_reconstruction(content_feat:Tensor, style_feat:Tensor): FILE: utils/image_process.py function check_image_size (line 7) | def check_image_size(x, padder_size=8): function image2tensor (line 24) | def image2tensor(img): function tensor2image (line 30) | def tensor2image(img): function create_hdr_effect (line 37) | def create_hdr_effect(original_image, hdr): FILE: utils/system.py function torch_gc (line 6) | def torch_gc(): function quantize_8bit (line 13) | def quantize_8bit(unet):