MCPcopy Create free account

hub / github.com/arnavkj1995/WEAVER / functions

Functions311 in github.com/arnavkj1995/WEAVER

↓ 83 callersMethodto
(self, device)
weaver/utils/tools.py:43
↓ 28 callersMethodload
Load trajectory latent features into memory.
weaver/datasets/droid.py:95
↓ 18 callersMethodload_state_dict
(self, state)
weaver/utils/tools.py:65
↓ 13 callersFunction_cfg_get
(cfg, key: str, default)
weaver/wm/model.py:18
↓ 13 callersFunctionmove_tensors_to_device
Convert numpy arrays to torch tensors and move to device.
weaver/utils/tools.py:178
↓ 11 callersMethoddecode_obs
( self, x: Dict[str, torch.Tensor], chunk_size: int = 0, )
weaver/wm/model.py:1171
↓ 11 callersMethodencode_memory_obs
Encode memory observations and assemble into flattened memory tokens. Uses FlowWM's separate memory projectors to encode, then adds
weaver/wm/model.py:1103
↓ 11 callersMethodinterpolate
( self, x1: dict[str, torch.Tensor], x0: dict[str, torch.Tensor], t: torch.Ten
weaver/wm/model.py:1958
↓ 10 callersFunctionsave_checkpoint
Save checkpoint to a single checkpoint.pt file (atomic overwrite).
weaver/utils/tools.py:123
↓ 10 callersMethodupdate
Call AFTER optimizer.step().
weaver/utils/tools.py:48
↓ 9 callersFunctioncreate_dataset
( cfg: dict, horizon: int, ddp: bool, batch_size: int, n_workers: int, split: str,
weaver/datasets/dataset.py:147
↓ 9 callersMethodtrain
(self, mode: bool = True)
weaver/reflow.py:275
↓ 7 callersMethod__init__
(self, in_dim: int = 384, # DINOv2 feature dim hidden_dim: int = 256,
weaver/wm/nets.py:91
↓ 7 callersFunctioncycle
(loader)
weaver/utils/tools.py:243
↓ 7 callersFunctionget_task_encoder
( config: dict, device: str = "cpu", )
weaver/wm/encoders.py:42
↓ 7 callersFunctionparquet_column_to_list
(frame, column: str)
datasets/preprocess_droid.py:34
↓ 6 callersMethod_cached_block
(self, block, x, T, prefix_T, rope_ids, mode, cache_k, cache_v, idx)
weaver/wm/model.py:657
↓ 6 callersFunction_nested_cfg_get
(cfg, key: str, default)
weaver/wm/model.py:22
↓ 6 callersMethodencode_obs
Encode observations into embeddings. Token structure: [patches_cam1, patches_cam2, ..., state] Args:
weaver/wm/model.py:378
↓ 6 callersFunctionload_checkpoint
Load checkpoint.
weaver/utils/tools.py:154
↓ 6 callersFunctionpreprocess_pi_image
Resize uint8 (H, W, 3) → (180, 320) then zero-pad to (224, 224).
weaver/robot/actions.py:26
↓ 5 callersMethod__init__
( self, img_keys: List[str], n_embed: int, n_hidden: int, n_im_feature
weaver/wm/model.py:178
↓ 5 callersFunctioncompute_fid
Compute FID between real and generated images. Args: real_images: (N, 3, H, W) tensor in [0, 1] fake_images: (M, 3, H, W
weaver/utils/model_metrics.py:159
↓ 5 callersMethoddecode
Decode WM output back to feature space. Token structure: [patches_cam1, patches_cam2, ..., state, action, time] Args:
weaver/wm/model.py:438
↓ 5 callersFunctiondict_to_namespace
(obj)
weaver/utils/tools.py:114
↓ 5 callersMethodencode_task
(self, task: Dict[str, torch.Tensor])
weaver/wm/model.py:1162
↓ 5 callersMethodgenerate_latent_rollouts
( self, x1: Dict[str, torch.Tensor], actions: torch.Tensor, memory: Optional[D
weaver/wm/model.py:1205
↓ 5 callersMethodgenerate_videos_full
Generate full video predictions by autoregressively chunking over the sequence. The window advances by `horizon` frames each step. If `bootst
weaver/wm/model.py:1611
↓ 5 callersFunctionget_encoder
( config: dict, image_size: int = 256, device: str = "cpu", )
weaver/wm/encoders.py:280
↓ 5 callersMethodstate_dict
(self)
weaver/utils/tools.py:62
↓ 5 callersFunctionupdate_config
Update nested dict `cfg` using dot-notation keys like 'training.lr'
weaver/utils/config.py:37
↓ 4 callersMethod_norm
(data, lo, hi, eps: float = 1e-8)
weaver/dynamics/model.py:132
↓ 4 callersMethodcompute_loss
( self, obs: dict[str, torch.Tensor], actions: torch.Tensor, tasks: torch.Tens
weaver/wm/model.py:214
↓ 4 callersFunctioncompute_statistics
Compute mean and covariance of features. Args: features: (N, D) array of features Returns: mu: (D,) mean vector
weaver/utils/model_metrics.py:36
↓ 4 callersMethodencode_obs
(self, obs: Dict[str, torch.Tensor])
weaver/wm/model.py:1084
↓ 4 callersFunctionextract_features
Extract features from images in batches
weaver/utils/model_metrics.py:190
↓ 4 callersMethodget_video_frames
Read a specific range of video frames. If preprocessed .npy frames exist, uses memory-mapped loading (very fast). Otherwise falls bac
weaver/datasets/droid.py:130
↓ 4 callersFunctionmerge_dicts
(base, override)
weaver/utils/config.py:19
↓ 4 callersFunctionrope_mix
Apply precomputed cos/sin RoPE to a tensor. cos, sin have shape (..., D) — already expanded to full head dim.
weaver/wm/nets.py:29
↓ 4 callersMethodsample_noise
( self, x1: Dict[str, torch.Tensor] )
weaver/wm/model.py:1948
↓ 4 callersFunctionsave_video_mp4
Write a (T, H, W, 3) uint8 array to an MP4 file.
weaver/utils/viz.py:94
↓ 3 callersMethod_build_pyramid_schedule
Build a pyramid scheduling matrix for flow-matching diffusion forcing. Returns a (height, horizon) tensor of t-values in [0, 1] where t=0 is
weaver/wm/model.py:1430
↓ 3 callersMethod_denorm
(data, lo, hi, eps: float = 1e-8)
weaver/dynamics/model.py:136
↓ 3 callersMethodapply_to
Copy EMA weights into the given model.
weaver/utils/tools.py:54
↓ 3 callersFunctionbuild_model
Construct WEAVER and move to device. Args: cfg: Full config namespace (from load_eval_config). device:
weaver/utils/wm_eval.py:62
↓ 3 callersMethodcompute_flow_loss
( self, x1: torch.Tensor, x0: torch.Tensor, pred: torch.Tensor, t: tor
weaver/wm/model.py:1906
↓ 3 callersFunctioncompute_fvd
FVD using I3D features. Expects (N, C, T, H, W) float [0,1].
weaver/utils/metrics.py:158
↓ 3 callersMethodconfigure_optimizers
(self, weight_decay, learning_rate, betas, device_type)
weaver/wm/model.py:2185
↓ 3 callersMethodencode_memory
Encode memory observations using separate memory projectors. Token structure per memory frame: [patches_cam1, patches_ca
weaver/wm/model.py:408
↓ 3 callersFunctionevaluate_with_metrics_ddp
Evaluate model with FID/FVD on master process only. Only rank 0 generates videos and computes metrics. Other ranks wait at a barrier.
weaver/utils/eval.py:11
↓ 3 callersFunctionget_lr
( it: int, warmup_steps: int, max_steps: int, max_lr: float, min_lr: float )
weaver/utils/tools.py:218
↓ 3 callersFunctionload_checkpoint_into_model
Find the latest checkpoint in checkpoint_dir and load it into wm.
weaver/utils/wm_eval.py:117
↓ 3 callersFunctionload_config
(path, mode="defaults")
weaver/utils/config.py:8
↓ 3 callersFunctionload_eval_config
Load WEAVER config: merge package defaults with checkpoint config, apply overrides.
weaver/utils/wm_eval.py:24
↓ 3 callersFunctionload_norm_stats
Return (state_mean, state_std, action_mean, action_std) as float32 numpy arrays.
weaver/utils/wm_eval.py:141
↓ 3 callersFunctionparse_config
(args: argparse.Namespace)
weaver/utils/config.py:54
↓ 2 callersMethod__init__
( self, model_name: str = "stabilityai/stable-diffusion-2-1", image_size: Tuple[int, i
weaver/wm/encoders.py:57
↓ 2 callersMethod_cached_blocks_forward
(self, x, T, P, prefix_T, mode, cache_k, cache_v)
weaver/wm/model.py:672
↓ 2 callersFunction_chunks_to_wm_tensors
Convert PI action chunks (numpy) to WEAVER-ready (fut_a, fut_s) torch tensors.
weaver/synth_data_gen.py:123
↓ 2 callersMethod_fetch
(self, index: int)
weaver/dynamics/train.py:46
↓ 2 callersMethod_generate_latent_rollouts_autoregressive
Diffusion forcing inference with pyramid scheduling. Generates future frames using a pyramid schedule where earlier frames denoise fa
weaver/wm/model.py:1489
↓ 2 callersMethod_generate_latent_rollouts_lockstep
Original lockstep inference: all future frames denoised together with the same timestep schedule. Used when diff_forcing=False.
weaver/wm/model.py:1379
↓ 2 callersFunction_get_policy
(host, port)
weaver/synth_data_gen.py:79
↓ 2 callersMethod_pack_tokens
Pack obs/action/noise-level tensors into transformer tokens.
weaver/wm/model.py:642
↓ 2 callersFunction_pad
(arr)
weaver/robot/actions.py:116
↓ 2 callersMethod_reshape_features
Reshape precomputed features to match target spatial_size. Precomputed features have shape (B, T, N_src, D_src) where: - D_s
weaver/wm/model.py:1020
↓ 2 callersFunction_rollout_step_update
( student_wm: WEAVER, xt: dict[str, torch.Tensor], x_pred: dict[str, torch.Tensor], step_t: to
weaver/reflow.py:171
↓ 2 callersFunction_sliding_window_clips
Extract sliding-window clips from a batch of videos (StyleGAN-V style). Args: videos: (N, 3, T, H, W) tensor window_size: nu
weaver/utils/model_metrics.py:333
↓ 2 callersFunction_t2u8
(t)
weaver/synth_data_gen.py:119
↓ 2 callersFunction_to_tensor
Convert to tensor. Handles List[Tensor] (variable-length) by padding to max T.
weaver/utils/eval.py:175
↓ 2 callersFunctionbuild_weaver_for_reflow
(cfg, *, move_ema_to_cuda: bool = True)
weaver/reflow.py:68
↓ 2 callersFunctioncalculate_frechet_distance
Calculate Fréchet distance between two Gaussian distributions. FID = ||mu1 - mu2||^2 + Tr(sigma1 + sigma2 - 2*sqrt(sigma1*sigma2))
weaver/utils/model_metrics.py:52
↓ 2 callersFunctioncollect_images
(dataloader, max_samples)
weaver/utils/model_metrics.py:510
↓ 2 callersFunctioncompute_fk_cartesian
(T, 7) joint angles → (T, 6) [x, y, z, rx, ry, rz] end-effector pose.
weaver/robot/fk.py:7
↓ 2 callersFunctioncompute_lpips
Computes LPIPS safely in chunks to avoid OOM. Works for both images and frames of videos. Args: real, fake: (N, C, H, W) or
weaver/utils/model_metrics.py:447
↓ 2 callersFunctioncompute_statistics
(features)
weaver/utils/metrics.py:104
↓ 2 callersFunctioncreate_dataloader
( dataset: Dataset, use_ddp: bool = False, B: int = 32, n_workers: int = 4 )
weaver/datasets/dataset.py:10
↓ 2 callersFunctionencode_real_frame
Encode a single real observation frame into WM latent features.
weaver/steer_pi_policy.py:113
↓ 2 callersFunctionextract_features
(clips)
weaver/utils/metrics.py:168
↓ 2 callersMethodforward_cached
Eval-only forward that reuses prefix temporal K/V across denoising steps.
weaver/wm/model.py:699
↓ 2 callersFunctiongather_frames
(key, idx)
weaver/generate_views.py:187
↓ 2 callersFunctiongather_states
(idx)
weaver/generate_views.py:192
↓ 2 callersMethodgenerate_latent_rollouts_cached
KV-cache eval variant of generate_latent_rollouts. The prefix is memory + history frames. It is clean/fixed for all denoising steps i
weaver/wm/model.py:1230
↓ 2 callersFunctionget_gpu_memory
()
weaver/utils/tools.py:249
↓ 2 callersFunctionget_observation
(cr_interfaces, robot_interface, camera_ids)
weaver/steer_pi_policy.py:98
↓ 2 callersFunctionimage_keys_from_cfg
(cfg)
weaver/finetune.py:106
↓ 2 callersFunctioninherit_pretrained_config
(cfg_dict: dict, pretrained_cfg: dict | None)
weaver/finetune.py:63
↓ 2 callersFunctionload_and_preprocess_video
Preprocess video frames: normalize and rearrange to (T, C, H, W)
weaver/datasets/droid.py:567
↓ 2 callersFunctionload_dynamics_model
Load a pre-trained Ctrl-World Dynamics model from a .pth checkpoint.
weaver/utils/wm_eval.py:165
↓ 2 callersFunctionload_font
Return a PIL ImageFont at the requested size using Pillow's built-in default.
weaver/utils/viz.py:18
↓ 2 callersFunctionload_pretrained_config
(pretrained_dir: str)
weaver/finetune.py:54
↓ 2 callersFunctionmaybe_override_eval_generation
(model: WEAVER, cfg)
weaver/reflow.py:110
↓ 2 callersFunctionpad_and_stack
Stack videos to a fixed length. When pad_short_clips is False, clips shorter than max_t are dropped. When pad_short_clips is True, short clip
weaver/utils/metrics.py:382
↓ 2 callersFunctionpi_chunks_to_wm_actions
Convert B*N PI action chunks to normalized WM video-rate actions and states. Velocity path (dynamics_model=None): Each video-rate step su
weaver/robot/actions.py:68
↓ 2 callersFunctionresize_frames
Bilinear resize (T, H, W, C) uint8 → (T, h, w, C) uint8.
weaver/utils/viz.py:31
↓ 2 callersFunctionresize_to
Resize a single (H, W, C) image to hw=(h, w); return a black frame if img is None.
weaver/utils/viz.py:38
↓ 2 callersFunctionsample_fvd_clips
Sample fixed-length clips for FVD from per-video tensors. Args: vid_list: list of (T, C, H, W) float videos. clip_len: number of
weaver/utils/metrics.py:451
↓ 2 callersMethodsample_timestep
( self, B: int, T: int )
weaver/wm/model.py:1973
↓ 2 callersFunctionsliding_window_fvd_clips
Extract training-style sliding FVD clips from per-video tensors. Mirrors the original WEAVER sliding-window metric implementation: clips are
weaver/utils/metrics.py:404
↓ 2 callersMethodunload
Free memory by unloading trajectory data
weaver/datasets/droid.py:162
next →1–100 of 311, ranked by callers