From 5c98e80430d4a747926b45893568e388105a2400 Mon Sep 17 00:00:00 2001 From: Haoming Song Date: Tue, 26 May 2026 20:04:22 +0800 Subject: [PATCH] fix(gr00t): fix Eagle25VL model and processor crash in transformers>=5.4.0, <5.6.0 (#3652) Co-authored-by: Steven Palma --- .../policies/groot/eagle2_hg_model/modeling_eagle2_5_vl.py | 1 + .../groot/eagle2_hg_model/processing_eagle2_5_vl.py | 1 - src/lerobot/policies/groot/processor_groot.py | 6 +++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lerobot/policies/groot/eagle2_hg_model/modeling_eagle2_5_vl.py b/src/lerobot/policies/groot/eagle2_hg_model/modeling_eagle2_5_vl.py index 5a66cfbce..6e5532ea4 100755 --- a/src/lerobot/policies/groot/eagle2_hg_model/modeling_eagle2_5_vl.py +++ b/src/lerobot/policies/groot/eagle2_hg_model/modeling_eagle2_5_vl.py @@ -60,6 +60,7 @@ class Eagle25VLPreTrainedModel(PreTrainedModel): "SiglipEncoderLayer", ] _skip_keys_device_placement = "past_key_values" + _supports_flash_attn = True _supports_flash_attn_2 = True _supports_cache_class = True _supports_static_cache = True diff --git a/src/lerobot/policies/groot/eagle2_hg_model/processing_eagle2_5_vl.py b/src/lerobot/policies/groot/eagle2_hg_model/processing_eagle2_5_vl.py index 7b1f67fef..b36e70c47 100755 --- a/src/lerobot/policies/groot/eagle2_hg_model/processing_eagle2_5_vl.py +++ b/src/lerobot/policies/groot/eagle2_hg_model/processing_eagle2_5_vl.py @@ -124,7 +124,6 @@ class Eagle25VLProcessor(ProcessorMixin): "videos_kwargs", "text_kwargs", ] - image_processor_class = "AutoImageProcessor" tokenizer_class = "AutoTokenizer" def __init__( diff --git a/src/lerobot/policies/groot/processor_groot.py b/src/lerobot/policies/groot/processor_groot.py index 3367de711..6848c7c84 100644 --- a/src/lerobot/policies/groot/processor_groot.py +++ b/src/lerobot/policies/groot/processor_groot.py @@ -206,7 +206,11 @@ def _build_eagle_processor(tokenizer_assets_repo: str = DEFAULT_TOKENIZER_ASSETS "Vendor files are copied during model creation. Create the policy/model first, " "or call ensure_eagle_cache_ready() before building processors." ) - proc = AutoProcessor.from_pretrained(str(cache_dir), trust_remote_code=True, use_fast=True) + proc = AutoProcessor.from_pretrained( + str(cache_dir), + trust_remote_code=True, + fix_mistral_regex=False, + ) proc.tokenizer.padding_side = "left" return proc