MCPcopy Create free account

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

Functions766 in github.com/showlab/Show-o

↓ 1 callersMethodforward
(self, x)
show-o2/models/modules.py:614
↓ 1 callersMethodforward
(self, hidden_states: torch.Tensor)
models/phi.py:208
↓ 1 callersMethodforward
(self, x)
models/common_modules.py:36
↓ 1 callersMethodforward_und_only
( self, text_tokens=None, image_latents=None, t=None,
show-o2/models/modeling_showo2_qwen2_5.py:160
↓ 1 callersMethodfrom_pretrained
r""" Instantiate a pretrained PyTorch model from a pretrained model configuration. The model is set in evaluation mode - `model.eval(
models/modeling_utils.py:416
↓ 1 callersFunctiongenerate_images
( model, vae_model, text_tokenizer, config, global_step, devic
show-o2/train_stage_one.py:603
↓ 1 callersFunctiongenerate_images
( model, vae_model, text_tokenizer, config, global_step, devic
show-o2/train_stage_two.py:639
↓ 1 callersFunctiongenerate_images
( model, vq_model, uni_prompting, accelerator, config, global_
training/train.py:767
↓ 1 callersFunctiongenerate_images
( model, vq_model, uni_prompting, accelerator, config, global_
training/train_w_clip_vit.py:787
↓ 1 callersMethodget_decay
Compute the decay factor for the exponential moving average.
models/training_utils.py:141
↓ 1 callersMethodget_drift
member function for obtaining the drift of the probability flow ODE
show-o2/transport/transport.py:200
↓ 1 callersMethodget_images
(self, return_pil=False)
llava/llava/conversation.py:153
↓ 1 callersFunctionget_instruct_data_loader
( tokenizer, batch_size, num_workers, world_size, local_rank,
llava/llava_instruct_data.py:241
↓ 1 callersFunctionget_lin_function
(x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15)
show-o2/transport/utils.py:41
↓ 1 callersMethodget_lin_function
( self, x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15 )
show-o2/transport/transport.py:141
↓ 1 callersFunctionget_loss_weight
(t, mask, min_val=0.3)
training/utils.py:73
↓ 1 callersFunctionget_parameter_device
(parameter: torch.nn.Module)
show-o2/models/modeling_utils.py:82
↓ 1 callersFunctionget_parameter_device
(parameter: torch.nn.Module)
models/modeling_utils.py:82
↓ 1 callersFunctionget_parameter_dtype
(parameter: torch.nn.Module)
show-o2/models/modeling_utils.py:98
↓ 1 callersFunctionget_parameter_dtype
(parameter: torch.nn.Module)
models/modeling_utils.py:98
↓ 1 callersFunctionget_plain_data_loader
( tokenizer, batch_size, num_workers, world_size, local_rank,
llava/llava_pretrain_data.py:156
↓ 1 callersMethodget_score
member function for obtaining score of x_t = alpha_t * x + sigma_t * eps
show-o2/transport/transport.py:233
↓ 1 callersMethodget_score_from_velocity
Wrapper function: transfrom velocity prediction model to score Args: velocity: [batch_dim, ...] shaped tensor; velocity model outp
show-o2/transport/path.py:74
↓ 1 callersFunctionget_vq_model_class
(model_type)
inference_mmu.py:36
↓ 1 callersFunctionget_vq_model_class
(model_type)
inference_t2i.py:30
↓ 1 callersFunctionget_vq_model_class
(model_type)
training/train.py:69
↓ 1 callersFunctionget_vq_model_class
(model_type)
training/train_w_clip_vit.py:66
↓ 1 callersFunctiongroup_by_keys_nothrow
Return function over iterator that groups key, value pairs into samples. :param keys: function that splits the key into key and extension (base_p
training/data.py:62
↓ 1 callersMethodi2v_prompt
:param image_ids: :param video_ids: :return:
training/prompting_utils.py:301
↓ 1 callersFunctionimage_transform
(image, resolution=256, normalize=True, mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5], y0_cent
show-o2/datasets/utils.py:12
↓ 1 callersMethodinit_conv_
(self, conv)
models/common_modules.py:59
↓ 1 callersMethodinit_conv_
(self, conv)
models/common_modules.py:146
↓ 1 callersFunctioninsert_separator
(X, sep)
llava/llava/mm_utils.py:188
↓ 1 callersMethodinterpolate_pos_encoding
This method allows to interpolate the pre-trained position encodings, to be able to use the model on higher resolution images. This m
show-o2/models/modeling_siglip.py:287
↓ 1 callersFunctionlecun_normal_
(tensor)
show-o2/models/modeling_siglip.py:160
↓ 1 callersMethodlm_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:577
↓ 1 callersMethodload_model
(self, device_map=None)
models/clip_encoder.py:18
↓ 1 callersFunctionload_video
(video_path, max_frames_num, fps, force_sample=False)
show-o2/utils.py:236
↓ 1 callersFunctionlog_grad_norm
(model, accelerator, global_step)
show-o2/train_stage_one.py:877
↓ 1 callersFunctionlog_grad_norm
(model, accelerator, global_step)
show-o2/train_stage_two.py:913
↓ 1 callersFunctionlog_grad_norm
(model, accelerator, global_step)
show-o2/train_mixed_modality_simple.py:836
↓ 1 callersFunctionlog_grad_norm
(model, accelerator, global_step)
training/train.py:892
↓ 1 callersFunctionlog_grad_norm
(model, accelerator, global_step)
training/train_w_clip_vit.py:912
↓ 1 callersMethodlvg_gen_prompt
(self, text_ids, image_ids)
training/prompting_utils.py:364
↓ 1 callersMethodlvg_prompt
(self, text_ids, image_ids, labels)
training/prompting_utils.py:309
↓ 1 callersFunctionmain
()
show-o2/train_stage_one.py:54
↓ 1 callersFunctionmain
()
show-o2/train_stage_two.py:55
↓ 1 callersFunctionmain
()
show-o2/train_mixed_modality_simple.py:56
↓ 1 callersFunctionmain
()
show-o2/evaluation/compute_dpg_bench.py:164
↓ 1 callersFunctionmain
()
training/train.py:78
↓ 1 callersFunctionmain
()
training/train_w_clip_vit.py:73
↓ 1 callersFunctionmask_by_random_topk
(mask_len, probs, temperature=1.0, generator=None)
models/sampling.py:31
↓ 1 callersMethodmm_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:647
↓ 1 callersMethodmmu_prompt
(self, image_ids, text_ids)
training/prompting_utils.py:162
↓ 1 callersFunctionmodality
(offset, length)
show-o2/models/omni_attention.py:32
↓ 1 callersFunctionparse_args
()
show-o2/datasets/image_text_dataset.py:309
↓ 1 callersFunctionparse_args
()
show-o2/datasets/imagenet_dataset.py:313
↓ 1 callersFunctionparse_args
()
show-o2/evaluation/compute_dpg_bench.py:16
↓ 1 callersFunctionprepare_dpg_data
(args)
show-o2/evaluation/compute_dpg_bench.py:65
↓ 1 callersFunctionprepare_inputs_and_labels
( pixel_values_or_image_ids: Union[torch.FloatTensor, torch.LongTensor], texts: Union[
training/train.py:468
↓ 1 callersFunctionprepare_inputs_and_labels
( pixel_values_or_image_ids: Union[torch.FloatTensor, torch.LongTensor], texts: Union[
training/train_w_clip_vit.py:431
↓ 1 callersFunctionprepare_latents_and_labels
( pixel_values: Union[torch.FloatTensor, torch.LongTensor], data_type, sha
show-o2/train_stage_one.py:346
↓ 1 callersFunctionprepare_latents_and_labels
( pixel_values: Union[torch.FloatTensor, torch.LongTensor], data_type, sha
show-o2/train_stage_two.py:382
↓ 1 callersFunctionprepare_latents_and_labels
( pixel_values: Union[torch.FloatTensor, torch.LongTensor], data_type, sha
show-o2/train_mixed_modality_simple.py:329
↓ 1 callersFunctionprepare_mixed_modal_gen_input
(prompts, nulls, text_tokenizer, num_image_tokens, bos_id, boi_id, eoi_id, pad_id, img_pad_id, device)
show-o2/models/misc.py:57
↓ 1 callersFunctionpreprocess_multimodal
(sources)
llava/llava_data_vq_unified.py:22
↓ 1 callersFunctionpreprocess_multimodal
(sources)
llava/llava_pretrain_data.py:17
↓ 1 callersFunctionpreprocess_multimodal
(sources)
llava/llava_instruct_data.py:23
↓ 1 callersFunctionpreprocess_plain
(sources, tokenizer)
llava/llava_pretrain_data.py:32
↓ 1 callersFunctionpreprocess_v0
( sources, tokenizer, )
llava/llava_data_vq_unified.py:37
↓ 1 callersFunctionpreprocess_v0
( sources, tokenizer, )
llava/llava_instruct_data.py:38
↓ 1 callersMethodprior_logp
Standard multivariate normal prior Assume z is batched
show-o2/transport/transport.py:60
↓ 1 callersFunctionprocess_anyres_image
Process an image with variable resolutions. Args: image (PIL.Image.Image): The input image to be processed. processor: The i
llava/llava/mm_utils.py:119
↓ 1 callersFunctionremove_prefix
(caption)
show-o2/datasets/utils.py:36
↓ 1 callersMethodreparameterize
(self, mu, log_var)
show-o2/models/wan21_vae.py:570
↓ 1 callersFunctionreplace_person_token
Used for CC12M
training/data.py:47
↓ 1 callersMethodreset_parameters
(self)
show-o2/models/modeling_showo2_qwen2_5.py:113
↓ 1 callersMethodreset_parameters
(self)
show-o2/models/modeling_semantic_layers.py:65
↓ 1 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.
llava/llava/mm_utils.py:42
↓ 1 callersFunctionsave_images_as_grid
(pil_images, fn, path, grid_size=(2, 2))
show-o2/utils.py:184
↓ 1 callersFunctionset_seed
Args: Helper function for reproducible behavior to set the seed in `random`, `numpy`, `torch`. seed (`int`): The seed to set.
models/training_utils.py:47
↓ 1 callersMethodt2i_gen_prompt
(self, text_ids, image_ids)
training/prompting_utils.py:92
↓ 1 callersMethodt2i_mask
(batch_size, seq_len) t2i sequence = [ [pad][pad][t2i][sot][text][text][eot][soi][image][image][eoi]
training/omni_attention.py:52
↓ 1 callersMethodt2v_gen_prompt
(self, text_ids, image_ids)
training/prompting_utils.py:268
↓ 1 callersMethodtest
(self)
training/omni_attention.py:125
↓ 1 callersFunctiontime_shift
(mu: float, sigma: float, t: th.Tensor)
show-o2/transport/utils.py:33
↓ 1 callersMethodtime_shift
(self, mu: float, sigma: float, t: th.Tensor)
show-o2/transport/transport.py:133
↓ 1 callersMethodtimestep_embedding
Create sinusoidal timestep embeddings. :param t: a 1-D Tensor of N indices, one per batch element. These ma
show-o2/models/misc.py:171
↓ 1 callersMethodtimestep_embedding
Create sinusoidal timestep embeddings. :param t: a 1-D Tensor of N indices, one per batch element. These ma
show-o2/models/modules.py:752
↓ 1 callersFunctiontrunc_normal_tf_
Fills the input Tensor with values drawn from a truncated normal distribution. The values are effectively drawn from the normal distribution :
show-o2/models/modeling_siglip.py:109
↓ 1 callersMethodunpatchify
x: (N, T, patch_size**2 * C) imgs: (N, H, W, C)
show-o2/models/modeling_showo2_qwen2_5.py:145
↓ 1 callersMethodupdate_step
(self, epoch: int, global_step: int, on_load_weights: bool = False)
models/modeling_magvitv2.py:39
↓ 1 callersMethodupdate_step_end
(self, epoch: int, global_step: int)
models/modeling_magvitv2.py:45
↓ 1 callersFunctionvisualize_predictions
( model, vq_model, uni_prompting, config, global_step, input_i
training/train.py:716
↓ 1 callersFunctionvisualize_predictions
( model, vq_model, uni_prompting, config, global_step, input_i
training/train_w_clip_vit.py:737
↓ 1 callersFunctionvisualize_reconstruction
( pixel_values, recons_images, captions, global_step )
show-o2/train_stage_one.py:702
↓ 1 callersFunctionvisualize_reconstruction
( pixel_values, recons_images, captions, global_step )
show-o2/train_stage_two.py:738
↓ 1 callersFunctionvisualize_reconstruction_video
( pixel_values, recons_images, captions, global_step )
show-o2/train_stage_one.py:817
↓ 1 callersFunctionvisualize_reconstruction_video
( pixel_values, recons_images, captions, global_step )
show-o2/train_stage_two.py:853
↓ 1 callersMethodvqa
(self, image, question)
show-o2/evaluation/compute_dpg_bench.py:60
← previousnext →201–300 of 766, ranked by callers