Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVIDIA/DreamDojo
/ functions
Functions
3,821 in github.com/NVIDIA/DreamDojo
⨍
Functions
3,821
◇
Types & classes
738
↳
Endpoints
11
↓ 246 callers
Method
get
Read data from a given ``filepath`` with 'rb' mode. Note: There are two types of return values for ``get``, one is ``bytes``
cosmos_predict2/_src/imaginaire/utils/easy_io/file_client.py:287
↓ 191 callers
Method
items
(self)
cosmos_predict2/_src/imaginaire/utils/registry.py:70
↓ 156 callers
Method
log
(self, metrics: Dict[str, Any], step: int)
cosmos_predict2/_src/reason1/parallelisms/metrics.py:112
↓ 116 callers
Method
keys
(self)
cosmos_predict2/_src/imaginaire/utils/registry.py:67
↓ 110 callers
Method
exists
Check whether a file path exists. Args: filepath (str or Path): Path to be checked whether exists. Returns:
cosmos_predict2/_src/imaginaire/utils/easy_io/file_client.py:354
↓ 85 callers
Method
size
(self)
cosmos_predict2/_src/predict2/utils/kv_cache.py:344
↓ 68 callers
Function
log_verbose
Print a message only if VERBOSE environment variable is set to 1. Args: message: The message to print
packages/cosmos-oss/vqa/utils.py:27
↓ 63 callers
Method
is_initialized
(self)
cosmos_predict2/_src/predict2/interactive/inference/action_video2world.py:37
↓ 60 callers
Method
update
(self, cur_state: torch.Tensor)
cosmos_predict2/_src/predict2/callbacks/grad_clip.py:42
↓ 57 callers
Function
log_info
Print a message regardless of VERBOSE setting. Use for important information, summaries, and critical messages. Args: message: T
packages/cosmos-oss/vqa/utils.py:38
↓ 52 callers
Method
synchronize
Synchronize all processes in distributed mode.
cosmos_predict2/_src/predict2/inference/interpolator_lib.py:245
↓ 48 callers
Method
load
( self, model: ImaginaireModel, optimizer: torch.optim.Optimizer | None = None,
cosmos_predict2/_src/predict2/checkpointer/dcp.py:546
↓ 46 callers
Method
device
(self)
external/lam/modules/embeddings.py:135
↓ 43 callers
Function
build_debug_runs
(job)
cosmos_predict2/_src/predict2/configs/video2world/experiment/resume_text2world/state3_14B_index_3.py:67
↓ 42 callers
Method
state_dict
(self, mapping_keys: dict[str, str] = {})
cosmos_predict2/_src/predict2/checkpointer/dcp.py:272
↓ 41 callers
Method
decode
(self, latent: torch.Tensor)
cosmos_predict2/_src/predict2/tokenizers/base_vae.py:449
↓ 40 callers
Function
broadcast_split_tensor
Broadcast the tensor from the minimum rank in the specified group(s).
cosmos_predict2/_src/imaginaire/utils/context_parallel.py:197
↓ 38 callers
Method
edit_data_type
Edit the data type of the condition. Args: data_type: The new data type. Returns: A new Text2WorldCondition
cosmos_predict2/_src/predict2/conditioner.py:113
↓ 38 callers
Method
to_dict
Converts the condition to a dictionary. Returns: Dictionary containing the condition's fields and values.
cosmos_predict2/_src/predict2/conditioner.py:78
↓ 37 callers
Method
is_image_batch
We hanlde two types of data_batch. One comes from a joint_dataloader where "dataset_name" can be used to differenciate image_batch and video_batch.
cosmos_predict2/_src/predict2/models/text2world_model.py:872
↓ 37 callers
Method
read
r"""Read function for reading the data stream. Args: amt (int, optional): Amount of data to read Returns: chun
cosmos_predict2/_src/imaginaire/datasets/webdataset/utils/stream.py:48
↓ 36 callers
Function
build_debug_runs
(job)
cosmos_predict2/_src/predict2/configs/video2world/experiment/reason_embeddings/stage3_2B.py:48
↓ 34 callers
Method
eval
(self)
groot_dreams/data/transform/base.py:68
↓ 31 callers
Function
_register_checkpoint
(checkpoint_config: CheckpointConfig)
cosmos_predict2/_src/imaginaire/utils/checkpoint_db.py:179
↓ 30 callers
Method
get_context_parallel_group
()
cosmos_predict2/_src/predict2/models/text2world_model.py:404
↓ 27 callers
Function
build_debug_runs
(job)
cosmos_predict2/_src/predict2/configs/video2world/experiment/resume_text2world/stage3_2B_ablation.py:67
↓ 27 callers
Method
load
Load a config file. Args: filename: absolute path or relative path w.r.t. the current working directory keys
cosmos_predict2/_src/imaginaire/lazy_config/lazy.py:253
↓ 25 callers
Method
load
Load network weights and optimizer states from a checkpoint in a single process. The priority of the checkpoint loading logic is: 1.
cosmos_predict2/_src/imaginaire/utils/checkpointer.py:160
↓ 24 callers
Function
get_file_backend
Return a file backend based on the prefix of uri or backend_args. Args: uri (str or Path): Uri to be parsed that contains the file prefix
cosmos_predict2/_src/imaginaire/utils/easy_io/easy_io.py:105
↓ 24 callers
Method
set_video_condition
Sets the video conditioning frames for video-to-video generation. This method creates a conditioning mask for the input video frames
cosmos_predict2/_src/predict2/configs/video2world/defaults/conditioner.py:47
↓ 23 callers
Method
broadcast_split_for_model_parallelsim
Broadcast and split the input data and condition for model parallelism. Currently, we only support context parallelism.
cosmos_predict2/_src/predict2/models/text2world_model.py:409
↓ 22 callers
Function
instantiate
Recursively instantiate objects defined in dictionaries by "_target_" and arguments. Args: cfg: a dict-like object with "_target
cosmos_predict2/_src/imaginaire/lazy_config/instantiate.py:56
↓ 21 callers
Function
print_if_verbose
(*args, **kwargs)
cosmos_predict2/_src/predict2/utils/model_comp.py:35
↓ 20 callers
Method
_translate_filepath
Translate a `filepath` to a string. Paths are of the form 'path/to/file' (path form) or '{protocol}://path/to/file' (URL form). Args
cosmos_predict2/_src/imaginaire/utils/easy_io/backends/msc_backend.py:157
↓ 18 callers
Method
_format_path
Convert a ``filepath`` to standard format of s3 oss. If the ``filepath`` is concatenated by ``os.path.join``, in a Windows environmen
cosmos_predict2/_src/imaginaire/utils/easy_io/backends/boto3_backend.py:85
↓ 18 callers
Method
_map_path
Map ``filepath`` to a string path whose prefix will be replaced by :attr:`self.path_mapping`. Args: filepath (str or Path
cosmos_predict2/_src/imaginaire/utils/easy_io/backends/boto3_backend.py:72
↓ 18 callers
Method
compute_text_embeddings_online
Compute text embeddings for the given prompts.
cosmos_predict2/_src/predict2/text_encoders/text_encoder.py:131
↓ 18 callers
Method
remove
Remove a file. Args: filepath (str, Path): Path to be removed.
cosmos_predict2/_src/imaginaire/utils/easy_io/file_client.py:346
↓ 17 callers
Method
apply
(self, data: dict[str, Any])
groot_dreams/data/transform/video.py:139
↓ 17 callers
Method
load
( self, model: ImaginaireModel, optimizer: torch.optim.Optimizer | None = None,
cosmos_predict2/_src/predict2/distill/checkpointer/dcp.py:501
↓ 16 callers
Method
__init__
(self, config)
cosmos_predict2/_src/reason1/networks/qwen2_vl.py:522
↓ 16 callers
Function
batch_mul
(x: Tensor, y: Tensor)
cosmos_predict2/_src/imaginaire/functional/batch_ops.py:49
↓ 16 callers
Function
get_text_embedding
Encodes text prompts into T5 embeddings. Args: prompts: A single text prompt or a list of text prompts. encoder: An optional Cosm
cosmos_predict2/_src/predict2/inference/get_t5_emb.py:133
↓ 16 callers
Method
load_state_dict
(self, state_dict)
cosmos_predict2/_src/imaginaire/utils/fused_adam.py:354
↓ 16 callers
Method
state_dict
(self)
cosmos_predict2/_src/predict2/distill/checkpointer/dcp.py:223
↓ 16 callers
Method
to_rotation_matrix
Convert quaternion(s) to rotation matrix/matrices. Args: q (torch.Tensor [...,4]): Quaternion(s) (x, y, z, w). Returns:
cosmos_predict2/_src/imaginaire/modules/camera.py:519
↓ 15 callers
Method
__init__
(self, config)
cosmos_predict2/_src/reason1/networks/qwen2_5_vl.py:645
↓ 15 callers
Function
build_debug_runs
(job)
cosmos_predict2/_src/predict2/configs/video2world/experiment/resume_text2world/sparse_2B.py:229
↓ 15 callers
Function
get_checkpoint_by_uuid
Return checkpoint config for UUID.
cosmos_predict2/_src/imaginaire/utils/checkpoint_db.py:904
↓ 15 callers
Function
get_local_tensor_if_DTensor
(tensor: torch.Tensor | DTensor)
cosmos_predict2/_src/reason1/utils/fused_adam.py:25
↓ 15 callers
Function
get_local_tensor_if_DTensor
(tensor: torch.Tensor | DTensor)
cosmos_predict2/_src/imaginaire/utils/misc.py:481
↓ 15 callers
Method
put
Write data to a given ``filepath`` with 'wb' mode. Note: ``put`` should create a directory if the directory of ``filepath``
cosmos_predict2/_src/imaginaire/utils/easy_io/file_client.py:318
↓ 14 callers
Method
__init__
( self, x_dim: int, context_dim: int, num_heads: int, mlp_ratio: float
cosmos_predict2/_src/predict2/camera/networks/dit_multiview_camera.py:1022
↓ 14 callers
Method
__init__
( self, x_dim: int, context_dim: int, num_heads: int, mlp_ratio: float
cosmos_predict2/_src/predict2/camera/networks/dit_multiview_camera_ar.py:1023
↓ 14 callers
Function
cat_outputs_cp
Concatenate outputs from different ranks in the checkpoint parallelism group. This function gathers tensors from all ranks in the checkpoint
cosmos_predict2/_src/imaginaire/utils/context_parallel.py:66
↓ 14 callers
Method
denoise
Performs denoising on the input noise data, noise level, and condition Args: xt (torch.Tensor): The input noise data.
cosmos_predict2/_src/predict2/models/text2world_model.py:883
↓ 14 callers
Method
encode
state : pixel range [-1, 1]
cosmos_predict2/_src/predict2/tokenizers/base_vae.py:428
↓ 14 callers
Function
get_checkpoint_path
Return checkpoint path for S3 URI, HuggingFace URI, or local path. Supports: - S3 URIs: s3://bucket/path/to/checkpoint - HuggingFace URIs
cosmos_predict2/_src/imaginaire/utils/checkpoint_db.py:944
↓ 14 callers
Method
get_latent_num_frames
(self, num_pixel_frames: int)
cosmos_predict2/_src/predict2/tokenizers/wan2pt1.py:1032
↓ 14 callers
Method
scaled_dot_product_attention
( self, query: Tensor, key: Tensor, value: Tensor, is_causal: bool = F
external/lam/modules/blocks.py:58
↓ 13 callers
Method
__init__
( self, x_dim: int, context_dim: int, num_heads: int, mlp_ratio: float
cosmos_predict2/_src/predict2/networks/minimal_v4_dit.py:1168
↓ 13 callers
Method
broadcast
Broadcasts and splits the condition across the checkpoint parallelism group. For most condition, such as Text2WorldCondition, we do not need s
cosmos_predict2/_src/predict2/conditioner.py:91
↓ 13 callers
Method
close
(self)
cosmos_predict2/_src/imaginaire/checkpointer/s3_filesystem.py:38
↓ 13 callers
Method
get_condition_uncondition
Processes the provided data batch to generate two sets of outputs: conditioned and unconditioned. This method manipulates the dropout
cosmos_predict2/_src/predict2/conditioner.py:502
↓ 13 callers
Method
get_condition_with_negative_prompt
Similar functionality as get_condition_uncondition But use negative prompts for unconditon
cosmos_predict2/_src/predict2/conditioner.py:533
↓ 13 callers
Method
mkdir
Create a "directory" in S3. Note: S3 doesn't have real directories, but we can create an empty object with a trailing slash
cosmos_predict2/_src/imaginaire/checkpointer/s3_filesystem.py:200
↓ 13 callers
Method
save
Save network weights, optimizer parameters, scheduler parameters to a checkpoint. Args: model (ImaginaireModel): The PyTorch mode
cosmos_predict2/_src/imaginaire/utils/checkpointer.py:70
↓ 13 callers
Method
state_dict
(self)
cosmos_predict2/_src/reason1/parallelisms/dcp_checkpointer.py:91
↓ 13 callers
Method
visual
(self, videos_B_C_H_W_n1_p1)
cosmos_predict2/_src/predict2/networks/clip.py:529
↓ 12 callers
Method
__init__
( self, z_dim=48, vae_pth="s3://bucket/cosmos_diffusion_v2/pretrain_weights/tokenizer/
cosmos_predict2/_src/predict2/tokenizers/wan2pt2.py:879
↓ 12 callers
Function
_random_unit_quaternion
(batch_shape=())
cosmos_predict2/_src/imaginaire/modules/camera_test.py:17
↓ 12 callers
Method
backward
( ctx, grad_out: Tensor, grad_lse: Tensor )
cosmos_predict2/_src/imaginaire/attention/cudnn/functions.py:154
↓ 12 callers
Method
broadcast
(self, process_group: torch.distributed.ProcessGroup)
cosmos_predict2/_src/predict2/configs/video2world/defaults/conditioner.py:147
↓ 12 callers
Function
build_no_s3_run
Make a copy of the input config that doesn't require S3 for checkpointing and I/O in the callbacks.
cosmos_predict2/_src/predict2/distill/utils/config_helper.py:21
↓ 12 callers
Method
copyfile_from_local
Upload a local file src to dst and return the destination file. Args: src (str or Path): A local file to be copied. d
cosmos_predict2/_src/imaginaire/utils/easy_io/backends/msc_backend.py:552
↓ 12 callers
Function
count_params
(model: nn.Module, verbose=False)
cosmos_predict2/_src/imaginaire/utils/count_params.py:19
↓ 12 callers
Function
euler2rotm
Euler angle (ZYX) to rotation matrix.
cosmos_predict2/_src/predict2/action/datasets/dataset_utils.py:128
↓ 12 callers
Function
get_arch_tag
Returns the compute capability of a given torch device if it's a CUDA device, otherwise returns 0. Args: device (torch.device | None
cosmos_predict2/_src/imaginaire/attention/utils/__init__.py:31
↓ 12 callers
Function
get_data_path
(embodiment)
groot_dreams/dataloader.py:230
↓ 12 callers
Function
import_all_modules_from_package
Import all modules from the specified package path recursively. This function is typically used in conjunction with Hydra to ensure that all
cosmos_predict2/_src/imaginaire/utils/config_helper.py:175
↓ 12 callers
Method
normalize
Normalize quaternion(s) to unit length. Args: q (torch.Tensor [...,4]): Input quaternion(s). eps (float): Small epsil
cosmos_predict2/_src/imaginaire/modules/camera.py:497
↓ 12 callers
Method
save
Save network weights, optimizer parameters, scheduler parameters to a checkpoint. Args: model (ImaginaireModel): The PyTorch mode
cosmos_predict2/_src/imaginaire/checkpointer/ddp.py:109
↓ 12 callers
Method
size
Get the file size in bytes for a given ``filepath``. Args: filepath (str or Path): Path to get file size in bytes. Retur
cosmos_predict2/_src/imaginaire/utils/easy_io/backends/msc_backend.py:195
↓ 11 callers
Method
_augment_image_dim_inplace
(self, data_batch: dict[str, Tensor], input_key: str = None)
cosmos_predict2/_src/predict2/models/text2world_model.py:786
↓ 11 callers
Function
broadcast_dtensor_model_states
Broadcast model states from replicate mesh's rank 0.
cosmos_predict2/_src/predict2/utils/dtensor_helper.py:73
↓ 11 callers
Method
init_weights
(self)
cosmos_predict2/_src/predict2/networks/wan2pt1.py:593
↓ 11 callers
Function
is_blackwell_dc
(device: torch.device | None = None)
cosmos_predict2/_src/imaginaire/attention/utils/__init__.py:70
↓ 11 callers
Function
is_torch_compiling
()
cosmos_predict2/_src/imaginaire/attention/utils/environment.py:30
↓ 11 callers
Method
isfile
Check whether a file path is a file. Args: filepath (str or Path): Path to be checked whether it is a file. Returns:
cosmos_predict2/_src/imaginaire/utils/easy_io/file_client.py:378
↓ 11 callers
Method
reset_parameters
(self)
cosmos_predict2/_src/predict2/networks/wan2pt1.py:253
↓ 11 callers
Method
run
(self, script: str, env: dict)
packages/cosmos-oss/cosmos_oss/fixtures/script.py:150
↓ 10 callers
Method
_forward
r""" Args: labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing
cosmos_predict2/_src/predict2/text_encoders/reason1.py:46
↓ 10 callers
Method
_normalize_video_databatch_inplace
Normalizes video data in-place on a CUDA device to reduce data loading overhead. This function modifies the video data tensor within
cosmos_predict2/_src/predict2/models/text2world_model.py:741
↓ 10 callers
Method
_replace_prefix
(self, filepath: Union[str, Path])
cosmos_predict2/_src/imaginaire/utils/easy_io/backends/boto3_backend.py:98
↓ 10 callers
Function
build_debug_runs
(job)
cosmos_predict2/_src/predict2/configs/video2world/experiment/reason_embeddings/model_2B_reason_1p1.py:48
↓ 10 callers
Method
copyfile_to_local
Copy the file src to local dst and return the destination file. If dst specifies a directory, the file will be copied into dst using
cosmos_predict2/_src/imaginaire/utils/easy_io/backends/msc_backend.py:627
↓ 10 callers
Method
fully_shard
(self, mesh)
cosmos_predict2/_src/predict2/networks/wan2pt1.py:948
↓ 10 callers
Method
get_context_parallel_group
()
cosmos_predict2/_src/predict2/models/text2world_model_rectified_flow.py:407
↓ 10 callers
Method
model
(self)
cosmos_predict2/_src/imaginaire/functional/lr_scheduler.py:53
↓ 10 callers
Function
non_strict_load_model
(model: torch.nn.Module, checkpoint_state_dict: dict)
cosmos_predict2/_src/imaginaire/utils/checkpointer.py:444
next →
1–100 of 3,821, ranked by callers