Views
No views yet
norm_stats.json. Pass norm_tag="robodojo" at inference time. The model predicts 25-step, 14D absolute joint-pose action chunks.pip install torch transformers pillow numpy huggingface_hubRoboDojo_lerobot_v30_video, episode 0, frame 0. The camera order for this checkpoint is high, left wrist, right wrist.| Top RGB | Left RGB | Right RGB |
|---|---|---|
![]() | ![]() | ![]() |
1from huggingface_hub import hf_hub_download
2from PIL import Image
3import numpy as np
4
5repo_id = "hqfang/MolmoAct2-RoboDojo"
6
7top_rgb = Image.open(
8 hf_hub_download(repo_id, "assets/sample_top_rgb.png")
9).convert("RGB")
10left_rgb = Image.open(
11 hf_hub_download(repo_id, "assets/sample_left_rgb.png")
12).convert("RGB")
13right_rgb = Image.open(
14 hf_hub_download(repo_id, "assets/sample_right_rgb.png")
15).convert("RGB")
16
17task = "Arrange the numbers from left to right to form the largest possible number, and place them on the pad."
18robot_state = np.array(
19 [
20 4.0714453293164143e-13,
21 -5.980358068871964e-16,
22 1.4396729160394704e-16,
23 3.3858371238235303e-16,
24 -6.58480106378867e-13,
25 1.9262460550228955e-12,
26 1.0,
27 4.0714296083849133e-13,
28 -5.980402008706103e-16,
29 1.4397026945415223e-16,
30 3.385876563795137e-16,
31 -6.584741432669183e-13,
32 1.9262503918315854e-12,
33 1.0,
34 ],
35 dtype=np.float32,
36)1import numpy as np
2import torch
3from huggingface_hub import hf_hub_download
4from PIL import Image
5from transformers import AutoModelForImageTextToText, AutoProcessor
6
7repo_id = "hqfang/MolmoAct2-RoboDojo"
8
9top_rgb = Image.open(
10 hf_hub_download(repo_id, "assets/sample_top_rgb.png")
11).convert("RGB")
12left_rgb = Image.open(
13 hf_hub_download(repo_id, "assets/sample_left_rgb.png")
14).convert("RGB")
15right_rgb = Image.open(
16 hf_hub_download(repo_id, "assets/sample_right_rgb.png")
17).convert("RGB")
18task = "Arrange the numbers from left to right to form the largest possible number, and place them on the pad."
19robot_state = np.array(
20 [
21 4.0714453293164143e-13,
22 -5.980358068871964e-16,
23 1.4396729160394704e-16,
24 3.3858371238235303e-16,
25 -6.58480106378867e-13,
26 1.9262460550228955e-12,
27 1.0,
28 4.0714296083849133e-13,
29 -5.980402008706103e-16,
30 1.4397026945415223e-16,
31 3.385876563795137e-16,
32 -6.584741432669183e-13,
33 1.9262503918315854e-12,
34 1.0,
35 ],
36 dtype=np.float32,
37)
38
39processor = AutoProcessor.from_pretrained(repo_id, trust_remote_code=True)
40model = AutoModelForImageTextToText.from_pretrained(
41 repo_id,
42 trust_remote_code=True,
43 dtype=torch.float32,
44).to("cuda").eval()
45
46out = model.predict_action(
47 processor=processor,
48 images=[top_rgb, left_rgb, right_rgb],
49 task=task,
50 state=robot_state,
51 norm_tag="robodojo",
52 inference_action_mode="continuous",
53 enable_depth_reasoning=False,
54 num_steps=10,
55 normalize_language=True,
56 enable_cuda_graph=True,
57)
58
59actions = out.actionsbfloat16. The float32 path uses the most GPU memory: roughly 26GB with CUDA graph enabled, or around 24GB without CUDA graph.bfloat16 instead:1model = AutoModelForImageTextToText.from_pretrained(
2 repo_id,
3 trust_remote_code=True,
4 dtype=torch.bfloat16,
5).to("cuda").eval()
6
7with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16):
8 out = model.predict_action(...)bfloat16 is much more memory efficient and can run under 16GB of GPU memory in our tests. It usually does not hurt performance much.images should preserve camera order: [top_rgb, left_rgb, right_rgb], corresponding to high, left-wrist, and right-wrist cameras. Images may be PIL images or RGB arrays. state is the raw 14D robot state, and absolute 14D actions are returned in robot scale.normalize_language=True is the default. It lowercases the task string and removes trailing sentence punctuation to match training preprocessing. Set it to False if you need to preserve the task text exactly.enable_cuda_graph=True is the default. The first few calls can be slow because the model warms up and captures CUDA graphs. run several random warm-up calls before measuring deployment latency. num_steps controls the continuous flow solver and defaults to the checkpoint config value, 10.enable_depth_reasoning=True will raise an error.1action_tokenizer = AutoProcessor.from_pretrained(
2 "allenai/MolmoAct2-FAST-Tokenizer",
3 trust_remote_code=True,
4)
5
6out = model.predict_action(
7 processor=processor,
8 images=[top_rgb, left_rgb, right_rgb],
9 task=task,
10 state=robot_state,
11 norm_tag="robodojo",
12 inference_action_mode="discrete",
13 action_tokenizer=action_tokenizer,
14 enable_depth_reasoning=False,
15)1@misc{fang2026molmoact2actionreasoningmodels,
2 title={MolmoAct2: Action Reasoning Models for Real-world Deployment},
3 author={Haoquan Fang and Jiafei Duan and Donovan Clay and Sam Wang and Shuo Liu and Weikai Huang and Xiang Fan and Wei-Chuan Tsai and Shirui Chen and Yi Ru Wang and Shanli Xing and Jaemin Cho and Jae Sung Park and Ainaz Eftekhar and Peter Sushko and Karen Farley and Angad Wadhwa and Cole Harrison and Winson Han and Ying-Chun Lee and Eli VanderBilt and Rose Hendrix and Suveen Ellawela and Lucas Ngoo and Joyce Chai and Zhongzheng Ren and Ali Farhadi and Dieter Fox and Ranjay Krishna},
4 year={2026},
5 eprint={2605.02881},
6 archivePrefix={arXiv},
7 primaryClass={cs.RO},
8 url={https://arxiv.org/abs/2605.02881},
9}