Views
No views yet

checkpoint-*.pt correspond to model checkpoints saved at different training steps, where * denotes the step number (e.g., checkpoint-15000.pt was saved at step 15,000).samples contains validation results on the validation dataset.1from models.ctrl_world import CtrlWorld
2import torch
3
4# Initialize model
5model = CtrlWorld(
6 svd_model_path="/path/to/stable-video-diffusion-img2vid",
7 clip_model_path="/path/to/clip-vit-base-patch32",
8 action_dim=18,
9 num_history=6,
10 num_frames=10,
11 text_cond=True,
12 motion_bucket_id=127,
13 fps=7,
14 his_cond_zero=False,
15 frame_level_cond=True
16)
17
18# Load checkpoint
19checkpoint_path = "model_ckpt/task_327/checkpoint-21500.pt"
20state_dict = torch.load(checkpoint_path, map_location='cpu')
21model.load_state_dict(state_dict)
22model.eval()
23
24# Inference
25with torch.no_grad():
26 latents = model.generate(
27 image=image_cond, # Conditional image (1, 4, 72, 40)
28 action=action_cond, # Action sequence (1, 16, 18)
29 text=["instruction"], # Text instruction (optional)
30 history=his_cond, # History frames (1, 6, 4, 72, 40)
31 num_frames=10,
32 num_inference_steps=50,
33 guidance_scale=2.0,
34 fps=7,
35 motion_bucket_id=127
36 )unet.*: Parameters of the UNet diffusion modelaction_encoder.*: Parameters of the action encoderstable-video-diffusion-img2vid-config-pathstabilityai/stable-video-diffusion-img2vidclip-vit-base-patch32-config-pathopenai/clip-vit-base-patch32MIT License
Copyright (c) 2026 Pyromind Dynamics
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.