# MolmoAct2Config加载失败：config.

> 原文链接：https://robotics.hellobike.com/pitfalls/2026-11-16-lerobot-5374
> 频道：pitfalls | 更新日期：2026-11-16 | 标签：auto, github-issue, lerobot
> 核心摘要：lerobot MolmoAct2模型因config.json含废弃字段报错，需手动迁移配置并重命名dtype字段以恢复float32精度加载。

# MolmoAct2Config加载失败：config.

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[MolmoAct2: lerobot/MolmoAct2-SO100_101-LeRobot config.json fails to load (fields removed from MolmoAct2Config)](https://github.com/huggingface/lerobot/issues/5374)（GitHub huggingface/lerobot #5374）

**状态**：有绕过办法

## 问题

使用lerobot 0.7.0加载`lerobot/MolmoAct2-SO100_101-LeRobot`检查点时，`PreTrainedConfig.from_pretrained`抛出`draccus.utils.DecodingError`，提示`enable_lora_vlm`、`enable_lora_action_expert`、`train_action_expert_only`及`model_dtype`四个字段在`M。

## 环境

lerobot 0.7.0, Python 3.12, torch 2.15.0, transformers 5.22.2; macOS 27.2.

## 解决办法

1. 读取原始`config.json`，断言并删除`enable_lora_vlm`、`enable_lora_action_expert`、`train_action_expert_only`三个布尔字段（确保其为False）。
2. 将`model_dtype`字段重命名为`dtype`并保留值`float32`，禁止直接删除该字段以免回退到默认的`bfloat16`导致MPS设备推理异常。
3. 新增`train_mode_vlm`字段并赋值为`fft`以匹配全量权重检查点。
4. 保存迁移后的JSON文件替换原配置，验证`MolmoAct2Policy.from_pretrained`可正常加载且精度为`torch.float32`。

讨论原作者：@oracle9i88 等，版权归原作者所有。
:::

## 原始参考来源 (Sources)

- [GitHub huggingface/lerobot #5374：MolmoAct2: lerobot/MolmoAct2-SO100_101-LeRobot config.json fails to load (fields removed from MolmoAct2Config)](https://github.com/huggingface/lerobot/issues/5374)