MCPcopy Create free account

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

Functions766 in github.com/showlab/Show-o

↓ 389 callersMethodto
r"""Move internal buffers of the ExponentialMovingAverage to `device`. Args: device: like `device` argument to `torch.Tensor.to`
models/training_utils.py:192
↓ 26 callersMethodbatch_decode
(self, zs)
show-o2/models/wan21_vae.py:650
↓ 25 callersMethodfrom_pretrained
(cls, path, model_cls)
models/training_utils.py:117
↓ 23 callersFunctionomni_attn_mask_naive
(B, LEN, modalities, device, inverted=True)
show-o2/models/omni_attention.py:56
↓ 17 callersMethodfrom_pretrained
r""" Instantiate a pretrained PyTorch model from a pretrained model configuration. The model is set in evaluation mode - `model.eval(
show-o2/models/modeling_utils.py:416
↓ 16 callersMethodload_state_dict
r""" Args: Loads the ExponentialMovingAverage state. This method is used by accelerate during checkpointing to save the ema st
models/training_utils.py:250
↓ 15 callersMethodsample
(self, videos, deterministic=False, return_features=False)
show-o2/models/wan21_vae.py:654
↓ 14 callersFunctioncreate_attention_mask_predict_next
(sequence, pad_id=128256, soi_id=128257, eoi_id=128258, rm_pad_in_image=False,
training/prompting_utils.py:466
↓ 14 callersFunctiondenorm
(images)
show-o2/utils.py:109
↓ 14 callersMethodupdate
(self, val, n=1)
show-o2/utils.py:102
↓ 13 callersMethod__init__
(self, config)
show-o2/models/modeling_siglip.py:617
↓ 13 callersMethod__init__
(self, config)
show-o2/models/modules.py:604
↓ 13 callersFunction_get_library_root_logger
()
show-o2/models/my_logging.py:69
↓ 13 callersFunction_get_library_root_logger
()
models/logging.py:69
↓ 13 callersFunctionget_text_tokenizer
(model_path, add_showo_tokens=True, return_showo_token_ids=False, llm_name="qwen2_5")
show-o2/models/misc.py:337
↓ 12 callersFunctionflatten_omega_conf
(cfg: Any, resolve: bool = False)
show-o2/utils.py:23
↓ 12 callersFunctionget_hyper_params
(config, text_tokenizer, showo_token_ids, is_video=False, is_hq=False)
show-o2/utils.py:123
↓ 11 callersMethod__init__
(self, config)
models/phi.py:201
↓ 11 callersFunctionget_config
()
show-o2/utils.py:15
↓ 10 callersMethod__init__
(self, config)
show-o2/models/qwen2.py:219
↓ 10 callersFunctionget_logger
Return a logger with the specified name. This function is not supposed to be directly accessed unless you are writing a custom muse module.
show-o2/models/my_logging.py:107
↓ 10 callersFunctionget_mask_chedule
(method, **schedule_kwargs)
models/sampling.py:68
↓ 10 callersFunctionload_state_dict
(model_path)
show-o2/utils.py:212
↓ 10 callersMethodsample_ode
returns a sampling function with given ODE settings Args: - sampling_method: type of sampler used in solving the ODE; default to be Do
show-o2/transport/transport.py:400
↓ 10 callersMethodstep
Performs a single optimization step. Args: closure (callable, optional): A closure that reevaluates the model and return
training/optimizer.py:44
↓ 9 callersFunction_configure_library_root_logger
()
show-o2/models/my_logging.py:73
↓ 9 callersFunction_configure_library_root_logger
()
models/logging.py:73
↓ 9 callersMethoddecode_code
(self, codebook_indices, shape=None)
models/modeling_magvitv2.py:429
↓ 9 callersFunctiondenorm_vid
(images)
show-o2/utils.py:115
↓ 9 callersFunctionprepare_gen_input
(prompts, text_tokenizer, num_image_tokens, bos_id, eos_id, boi_id, eoi_id, pad_id, img_pad_id,
show-o2/models/misc.py:24
↓ 8 callersMethod__init__
(self, z_dim=16, vae_pth='', dtype=torch.float,
show-o2/models/wan21_vae.py:624
↓ 8 callersMethod__init__
(self, in_channels, with_conv)
models/common_modules.py:28
↓ 8 callersMethodcompute_sigma_t
Compute the noise coefficient along the path
show-o2/transport/path.py:29
↓ 8 callersMethodcopy
(self)
llava/llava/conversation.py:181
↓ 8 callersMethoddecode
(self, z, scale)
show-o2/models/wan21_vae.py:544
↓ 8 callersMethoddevice
`torch.device`: The device on which the module is (assuming that all the module parameters are on the same device).
show-o2/models/modeling_utils.py:1008
↓ 8 callersFunctionexpand_t_like_x
Function to reshape time t to broadcastable dimension of x Args: t: [batch_dim,], time vector x: [batch_dim,...], data point
show-o2/transport/path.py:5
↓ 7 callersFunctionNormalize
(in_channels)
models/common_modules.py:21
↓ 7 callersFunctioncreate_imagetext_dataloader
(train_shards_path_or_url: str, batch_size: int,
show-o2/datasets/image_text_dataset.py:187
↓ 7 callersFunctioncreate_transport
function for creating Transport object **Note**: model prediction defaults to velocity Args: - path_type: type of path to use; default to
show-o2/transport/__init__.py:4
↓ 7 callersMethodget_code
(self, pixel_values)
models/modeling_magvitv2.py:423
↓ 7 callersMethodreset
(self)
show-o2/utils.py:96
↓ 7 callersMethodstate_dict
r""" Returns the state of the ExponentialMovingAverage as a dict. This method is used by accelerate during checkpointing to save the e
models/training_utils.py:204
↓ 6 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
show-o2/models/qwen2.py:233
↓ 6 callersMethodsave_pretrained
Save a model and its configuration file to a directory so that it can be reloaded using the [`~models.ModelMixin.from_pretrained`] cl
show-o2/models/modeling_utils.py:270
↓ 6 callersMethodwrite
(self, buf)
llava/llava/utils.py:73
↓ 5 callersMethod__init__
( self, patch_size=16, in_chans=3, embed_dim=768,
show-o2/models/misc.py:127
↓ 5 callersMethodcollate_fn
(self, batch)
show-o2/datasets/mixed_dataloader.py:145
↓ 5 callersMethodcreate_block_mask
(self, sequence, pad_begin_ends=[(0, 80), (0, 100), (0, 110), (0, 0)], type="t2i")
training/omni_attention.py:98
↓ 5 callersFunctionimage_transform
(image, resolution=256, normalize=True)
training/utils.py:179
↓ 5 callersFunctionnonlinearity
(x)
models/common_modules.py:16
↓ 5 callersMethodreset
(self)
training/utils.py:166
↓ 5 callersFunctionset_seed
(seed)
show-o2/utils.py:228
↓ 5 callersMethodt2i_generate
Generate 1:1 similar to the original MaskGit repo https://github.com/google-research/maskgit/blob/main/maskgit/libml/parallel_decode.
models/modeling_showo.py:104
↓ 4 callersMethodappend_message
(self, role, message)
llava/llava/conversation.py:110
↓ 4 callersMethodcheck_interval
( self, train_eps, sample_eps, *, diffusion_form="SBDM", sde=F
show-o2/transport/transport.py:70
↓ 4 callersMethodclear_cache
(self)
show-o2/models/wan21_vae.py:585
↓ 4 callersMethodcompute_alpha_t
Compute the data coefficient along the path
show-o2/transport/path.py:25
↓ 4 callersMethodcompute_drift
We always output sde according to score parametrization;
show-o2/transport/path.py:37
↓ 4 callersFunctionflatten_omega_conf
(cfg: Any, resolve: bool = False)
training/utils.py:20
↓ 4 callersMethodget_prompt
(self)
llava/llava/conversation.py:33
↓ 4 callersFunctioninput_ids_to_masked_buckets
(input_ids, mask_id, total_buckets=10)
models/training_utils.py:418
↓ 4 callersFunctionmodulate
(x, shift, scale)
show-o2/models/modules.py:98
↓ 4 callersFunctionomni_attn_mask
(modalities)
show-o2/models/omni_attention.py:40
↓ 4 callersMethodplan
(self, t, x0, x1)
show-o2/transport/path.py:143
↓ 4 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
show-o2/models/modules.py:342
↓ 4 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
models/phi.py:216
↓ 4 callersMethodsave_pretrained
(self, path)
models/training_utils.py:126
↓ 4 callersFunctionset_verbosity
Set the verbosity level for the 🤗 muse' root logger. Args: verbosity (`int`): Logging level, e.g., one of:
show-o2/models/my_logging.py:144
↓ 4 callersFunctionset_verbosity
Set the verbosity level for the 🤗 muse' root logger. Args: verbosity (`int`): Logging level, e.g., one of:
models/logging.py:144
↓ 4 callersMethodupdate
(self, val, n=1)
training/utils.py:172
↓ 3 callersMethod__init__
( self, )
models/modeling_magvitv2.py:404
↓ 3 callersFunction_freeze_params
(model, frozen_params=None)
show-o2/utils.py:75
↓ 3 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
show-o2/models/qwen2.py:190
↓ 3 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
models/phi.py:171
↓ 3 callersFunctionaverage_by_buckets
(values, masked_buckets, total_buckets)
models/training_utils.py:400
↓ 3 callersMethoddevice
`torch.device`: The device on which the module is (assuming that all the module parameters are on the same device).
models/modeling_utils.py:1010
↓ 3 callersMethodencode
(self, x, scale)
show-o2/models/wan21_vae.py:516
↓ 3 callersMethodfeature_select
(self, image_forward_outs)
models/clip_encoder.py:29
↓ 3 callersMethodget_indices
(self, z_q)
models/modeling_magvitv2.py:201
↓ 3 callersFunctionget_logger
Return a logger with the specified name. This function is not supposed to be directly accessed unless you are writing a custom muse module.
models/logging.py:107
↓ 3 callersFunctionget_scheduler
Unified API to get any scheduler from its name. Args: name (`str` or `SchedulerType`): The name of the scheduler to use.
show-o2/models/lr_schedulers.py:237
↓ 3 callersFunctionget_weight_type
(config)
show-o2/models/misc.py:389
↓ 3 callersFunctionlog
(t, eps=1e-20)
models/sampling.py:10
↓ 3 callersFunctionnext_token_prediction
(logits, labels, vocab_szie)
show-o2/models/misc.py:11
↓ 3 callersFunctionremove_prefix
(caption)
training/data.py:108
↓ 3 callersMethodsample
Sampling x0 & t based on shape of x1 (if needed) Args: x1 - data point; [batch, *dim]
show-o2/transport/transport.py:98
↓ 3 callersMethodset_use_memory_efficient_attention_xformers
( self, valid: bool, attention_op: Optional[Callable] = None )
show-o2/models/modeling_utils.py:211
↓ 3 callersMethodset_use_memory_efficient_attention_xformers
( self, valid: bool, attention_op: Optional[Callable] = None )
models/modeling_utils.py:211
↓ 3 callersMethodset_use_npu_flash_attention
r""" Set the switch for the npu flash attention.
show-o2/models/modeling_utils.py:181
↓ 3 callersMethodset_use_npu_flash_attention
r""" Set the switch for the npu flash attention.
models/modeling_utils.py:181
↓ 3 callersFunctionset_verbosity_error
Set the verbosity to the `ERROR` level.
show-o2/models/my_logging.py:178
↓ 3 callersFunctionset_verbosity_info
Set the verbosity to the `INFO` level.
show-o2/models/my_logging.py:163
↓ 3 callersFunctionto_tensor_and_normalize
(image, mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
show-o2/datasets/utils.py:30
↓ 2 callersMethod_convert_deprecated_attention_blocks
(self, state_dict: OrderedDict)
show-o2/models/modeling_utils.py:1060
↓ 2 callersMethod_convert_deprecated_attention_blocks
(self, state_dict: OrderedDict)
models/modeling_utils.py:1062
↓ 2 callersFunction_get_library_name
()
show-o2/models/my_logging.py:65
↓ 2 callersFunction_get_library_name
()
models/logging.py:65
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
models/phi.py:94
↓ 2 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
show-o2/models/modules.py:228
next →1–100 of 766, ranked by callers