MCPcopy Create free account

hub / github.com/showlab/Show-o / functions

Functions766 in github.com/showlab/Show-o

↓ 2 callersFunctioncount_conv3d
(model)
show-o2/models/wan21_vae.py:475
↓ 2 callersFunctioncreate_attention_mask_for_mmu
(sequence, eoi_id=128258, return_inverse_mask=True)
training/prompting_utils.py:591
↓ 2 callersFunctioncreate_attention_mask_for_mmu_vit
( sequence, return_inverse_mask=True, system_prompt_len=0 )
training/prompting_utils.py:606
↓ 2 callersFunctioncreate_imagenet_dataloader
(train_shards_path_or_url: str, batch_size: int,
show-o2/datasets/imagenet_dataset.py:191
↓ 2 callersFunctionexpand2square
(pil_img, background_color)
llava/llava/mm_utils.py:152
↓ 2 callersFunctionexpand_dims
Expand the tensor `v` to the dim `dims`. Args: `v`: a PyTorch tensor with shape [N]. `dim`: a `int`. Returns: a
show-o2/transport/utils.py:46
↓ 2 callersFunctionfilter_keys
(key_set)
training/data.py:55
↓ 2 callersFunctionformat_sequence_gen_qwen2_5
(text_tokens, system_tokens, bos_id, eos_id, boi_id, eoi_id, pad_id, img_pad_id,
show-o2/datasets/utils.py:52
↓ 2 callersFunctionformat_sequence_und
(text_tokens, bos_id, eos_id, boi_id, eoi_id, pad_id, img_pad_id, num_image_tokens, ma
show-o2/datasets/utils.py:81
↓ 2 callersMethodforward
(self, x)
show-o2/models/wan21_vae.py:510
↓ 2 callersMethodget_codebook_entry
(self, indices, shape=None)
models/modeling_magvitv2.py:208
↓ 2 callersFunctionget_config
()
training/utils.py:12
↓ 2 callersMethodget_image_features
r""" Returns: image_features (`torch.FloatTensor` of shape `(batch_size, output_dim`): The image embeddings obtained by
show-o2/models/modeling_siglip.py:1302
↓ 2 callersFunctionget_instruct_data_loader
( tokenizer, batch_size, num_workers, world_size, local_rank,
llava/llava_data_vq_unified.py:241
↓ 2 callersFunctionget_scheduler
Unified API to get any scheduler from its name. Args: name (`str` or `SchedulerType`): The name of the scheduler to use.
models/lr_schedulers.py:237
↓ 2 callersFunctiongumbel_noise
(t, generator=None)
models/sampling.py:14
↓ 2 callersFunctionhandle_dict
(key: Any, value: Any, resolve: bool)
show-o2/utils.py:26
↓ 2 callersFunctionhandle_dict
(key: Any, value: Any, resolve: bool)
training/utils.py:23
↓ 2 callersFunctionhandle_list
(key: Any, value: Any, resolve: bool)
show-o2/utils.py:29
↓ 2 callersFunctionhandle_list
(key: Any, value: Any, resolve: bool)
training/utils.py:26
↓ 2 callersFunctioninterpolate_pos_encoding
This method allows to interpolate the pre-trained position encodings, to be able to use the model on higher resolution images. This method is
show-o2/models/misc.py:305
↓ 2 callersMethodlm_prompt
(self, text_ids, max_seq_len)
training/prompting_utils.py:126
↓ 2 callersFunctionmask_or_random_replace_tokens
(image_tokens, mask_id, config, mask_schedule, is_train=True)
training/utils.py:77
↓ 2 callersFunctionmean_flat
Take the mean over all non-batch dimensions.
show-o2/transport/utils.py:13
↓ 2 callersMethodmmu_generate
Take a conditioning sequence of indices idx (LongTensor of shape (b,t)) and complete the sequence max_new_tokens times, feeding the p
show-o2/models/modeling_showo2_qwen2_5.py:517
↓ 2 callersMethodmmu_generate
Take a conditioning sequence of indices idx (LongTensor of shape (b,t)) and complete the sequence max_new_tokens times, feeding the p
models/modeling_showo.py:184
↓ 2 callersFunctionnorm_cdf
(x)
show-o2/models/modeling_siglip.py:76
↓ 2 callersMethodprocess_image
(self, image, image_process_mode, return_pil=False, image_format='PNG', max_len=1344, min_len=672)
llava/llava/conversation.py:113
↓ 2 callersFunctionresize_and_pad_image
Resize and pad an image to a target resolution while maintaining aspect ratio. Args: image (PIL.Image.Image): The input image.
show-o2/datasets/utils.py:201
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
show-o2/models/qwen2.py:182
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
show-o2/models/modules.py:221
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
models/phi.py:163
↓ 2 callersFunctionsave_checkpoint
(model, config, accelerator, global_step)
show-o2/train_stage_one.py:836
↓ 2 callersFunctionsave_checkpoint
(model, config, accelerator, global_step)
show-o2/train_stage_two.py:872
↓ 2 callersFunctionsave_checkpoint
(model, config, accelerator, global_step)
show-o2/train_mixed_modality_simple.py:795
↓ 2 callersFunctionsave_checkpoint
(model, config, accelerator, global_step)
training/train.py:851
↓ 2 callersFunctionsave_checkpoint
(model, config, accelerator, global_step)
training/train_w_clip_vit.py:871
↓ 2 callersFunctionselect_best_resolution
Selects the best resolution from a list of possible resolutions based on the original size. Args: original_size (tuple): The origina
llava/llava/mm_utils.py:12
↓ 2 callersFunctionset_verbosity_error
Set the verbosity to the `ERROR` level.
models/logging.py:178
↓ 2 callersFunctionset_verbosity_info
Set the verbosity to the `INFO` level.
models/logging.py:163
↓ 2 callersMethodt2i_prompt
(self, text_ids, image_ids, labels)
training/prompting_utils.py:39
↓ 2 callersMethodt2v_prompt
(self, text_ids, image_ids, labels)
training/prompting_utils.py:214
↓ 2 callersFunctionvariance_scaling_
(tensor, scale=1.0, mode="fan_in", distribution="normal")
show-o2/models/modeling_siglip.py:135
↓ 2 callersFunctionvelocity_prediction
(latents, labels, mask=None)
show-o2/models/misc.py:16
↓ 2 callersFunctionweighted_random_sample_fast
(elements, probabilities)
show-o2/datasets/mixed_dataloader.py:24
↓ 1 callersMethod__forward_fn
TODO: generalize here by adding all private functions ending with steps to it
show-o2/transport/integrators.py:51
↓ 1 callersMethod__get_last_step
Get the last step function of the SDE solver
show-o2/transport/transport.py:289
↓ 1 callersMethod__get_sde_diffusion_and_drift
( self, *, diffusion_form="SBDM", diffusion_norm=1.0, )
show-o2/transport/transport.py:271
↓ 1 callersMethod__getitem__
(self, i)
llava/llava_data_vq_unified.py:155
↓ 1 callersMethod__getitem__
(self, i)
llava/llava_pretrain_data.py:81
↓ 1 callersMethod__getitem__
(self, i)
llava/llava_instruct_data.py:155
↓ 1 callersMethod__init__
(self, sigma=0.0)
show-o2/transport/path.py:22
↓ 1 callersMethod__init__
(self, vision_tower)
models/clip_encoder.py:7
↓ 1 callersMethod__len__
(self)
show-o2/datasets/mmu_dataset.py:92
↓ 1 callersMethod_concat_max_size_cycle
(self)
show-o2/datasets/mixed_dataloader.py:83
↓ 1 callersMethod_concat_min_size
(self)
show-o2/datasets/mixed_dataloader.py:95
↓ 1 callersFunction_distributed_available
()
models/misc.py:44
↓ 1 callersMethod_dynamic_frequency_update
dynamic RoPE layers should recompute `inv_freq` in the following situations: 1 - growing beyond the cached sequence length (allow sca
show-o2/models/qwen2.py:139
↓ 1 callersMethod_dynamic_frequency_update
dynamic RoPE layers should recompute `inv_freq` in the following situations: 1 - growing beyond the cached sequence length (allow sca
show-o2/models/modules.py:300
↓ 1 callersMethod_flash_attention_forward
Calls the forward method of Flash Attention - if the input hidden states contain at least one padding token first unpad the input, th
models/phi.py:518
↓ 1 callersFunction_get_default_logging_level
If muse_VERBOSITY env var is set to one of the valid choices return that as the new default level. If it is not - fall back to `_default_log_
show-o2/models/my_logging.py:49
↓ 1 callersFunction_get_default_logging_level
If muse_VERBOSITY env var is set to one of the valid choices return that as the new default level. If it is not - fall back to `_default_log_
models/logging.py:49
↓ 1 callersMethod_get_interleaved_data
Extracts interleaved image-text data from annotation. Args: anno: Annotation dictionary for a sample. Returns:
show-o2/datasets/vist_dataset.py:121
↓ 1 callersFunction_get_unpad_data
(attention_mask)
models/phi.py:66
↓ 1 callersMethod_init_rope
(self)
models/phi.py:275
↓ 1 callersMethod_load_pretrained_model
( cls, model, state_dict: OrderedDict, resolved_archive_file, pretrain
show-o2/models/modeling_utils.py:865
↓ 1 callersMethod_load_pretrained_model
( cls, model, state_dict: OrderedDict, resolved_archive_file, pretrain
models/modeling_utils.py:867
↓ 1 callersMethod_max_size_cycle
(self)
show-o2/datasets/mixed_dataloader.py:55
↓ 1 callersMethod_min_size
(self)
show-o2/datasets/mixed_dataloader.py:68
↓ 1 callersMethod_prepare_4d_causal_attention_mask_with_cache_position
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_l
show-o2/models/qwen2.py:1023
↓ 1 callersMethod_sequential_max_size_cycle
(self)
show-o2/datasets/mixed_dataloader.py:109
↓ 1 callersMethod_temp_convert_self_to_deprecated_attention_blocks
(self)
show-o2/models/modeling_utils.py:1104
↓ 1 callersMethod_temp_convert_self_to_deprecated_attention_blocks
(self)
models/modeling_utils.py:1106
↓ 1 callersFunction_trunc_normal_
(tensor, mean, std, a, b)
show-o2/models/modeling_siglip.py:73
↓ 1 callersMethod_undo_temp_convert_self_to_deprecated_attention_blocks
(self)
show-o2/models/modeling_utils.py:1131
↓ 1 callersMethod_undo_temp_convert_self_to_deprecated_attention_blocks
(self)
models/modeling_utils.py:1133
↓ 1 callersMethod_upad_input
(self, query_layer, key_layer, value_layer, attention_mask, query_length)
models/phi.py:578
↓ 1 callersFunction_video_vae
Autoencoder3d adapted from Stable Diffusion 1.x, 2.x and XL.
show-o2/models/wan21_vae.py:595
↓ 1 callersMethodcall_for_batch
(self, output_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs)
llava/llava/mm_utils.py:231
↓ 1 callersFunctioncast_tuple
(t, length=1)
models/common_modules.py:235
↓ 1 callersFunctioncausal
(b, h, q_idx, kv_idx)
show-o2/models/omni_attention.py:24
↓ 1 callersMethodcompute_d_alpha_alpha_ratio_t
Compute the ratio between d_alpha and alpha
show-o2/transport/path.py:33
↓ 1 callersMethodcompute_diffusion
Compute the diffusion term of the SDE Args: x: [batch_dim, ...], data point t: [batch_dim,], time vector form: s
show-o2/transport/path.py:47
↓ 1 callersFunctioncompute_dpg_one_sample
(args, question_dict, image_path, vqa_model, resolution)
show-o2/evaluation/compute_dpg_bench.py:109
↓ 1 callersMethodcompute_mu_t
Compute the mean of time-dependent density p_t
show-o2/transport/path.py:118
↓ 1 callersMethodcompute_ut
Compute the vector field corresponding to p_t
show-o2/transport/path.py:133
↓ 1 callersMethodcompute_xt
Sample xt from time-dependent density p_t; rng is required
show-o2/transport/path.py:128
↓ 1 callersMethodcopy_to
Copy current averaged parameters into given collection of parameters. Args: parameters: Iterable of `torch.nn.Parameter`
models/training_utils.py:179
↓ 1 callersFunctioncreate_attention_mask_for_mmu_vit
( sequence, return_inverse_mask=False, system_prompt_len=0 )
training/omni_attention.py:137
↓ 1 callersFunctioncreate_dataloader
(dataset, batch_size, collate_fn)
show-o2/train_stage_two.py:256
↓ 1 callersFunctioncreate_dataloader
(dataset, batch_size, collate_fn)
show-o2/train_mixed_modality_simple.py:210
↓ 1 callersFunctioncrop_image
(input_image, crop_tuple=None)
show-o2/evaluation/compute_dpg_bench.py:101
↓ 1 callersFunctiondefault_flax_embed_init
(tensor)
show-o2/models/modeling_siglip.py:164
↓ 1 callersFunctiondivide_to_patches
Divides an image into patches of a specified size. Args: image (PIL.Image.Image): The input image. patch_size (int): The siz
llava/llava/mm_utils.py:77
↓ 1 callersFunctionexample
()
show-o2/datasets/image_text_dataset.py:237
↓ 1 callersFunctionexample
()
show-o2/datasets/imagenet_dataset.py:241
↓ 1 callersFunctionformat_interleaved_sequence
# generation # [bos_id, text_tokens, im_start, image_tokens, im_end, eos_id, pad_id] # eg. 0 1-9 10 11-15
show-o2/datasets/utils.py:104
↓ 1 callersMethodformat_multi_sequence_und_qwen2_5
(self, sources, targets, ignore_question=True)
show-o2/datasets/mmu_dataset.py:95
↓ 1 callersMethodforward
(self, hidden_state)
show-o2/models/qwen2.py:228
↓ 1 callersMethodforward
(self, x: torch.Tensor)
show-o2/models/modeling_siglip.py:61
← previousnext →101–200 of 766, ranked by callers