From 54c38627bd37fb5e1665a8dbc95e88b3350e3f44 Mon Sep 17 00:00:00 2001 From: Steven Palma Date: Thu, 12 Feb 2026 19:33:34 +0100 Subject: [PATCH] chore(dependencies): bump wall x to transformers v5 --- src/lerobot/policies/wall_x/modeling_wall_x.py | 2 +- src/lerobot/policies/wall_x/qwen_model/qwen2_5_vl_moe.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lerobot/policies/wall_x/modeling_wall_x.py b/src/lerobot/policies/wall_x/modeling_wall_x.py index ef99bad89..36f896998 100644 --- a/src/lerobot/policies/wall_x/modeling_wall_x.py +++ b/src/lerobot/policies/wall_x/modeling_wall_x.py @@ -331,7 +331,7 @@ class Qwen2_5_VLMoEForAction(Qwen2_5_VLForConditionalGeneration): force_download=kwargs.get("force_download", False), resume_download=kwargs.get("resume_download"), proxies=kwargs.get("proxies"), - use_auth_token=kwargs.get("use_auth_token"), + token=kwargs.get("token"), revision=kwargs.get("revision"), local_files_only=kwargs.get("local_files_only", False), ) diff --git a/src/lerobot/policies/wall_x/qwen_model/qwen2_5_vl_moe.py b/src/lerobot/policies/wall_x/qwen_model/qwen2_5_vl_moe.py index 490e25095..d0091a83d 100644 --- a/src/lerobot/policies/wall_x/qwen_model/qwen2_5_vl_moe.py +++ b/src/lerobot/policies/wall_x/qwen_model/qwen2_5_vl_moe.py @@ -11,7 +11,6 @@ from transformers.activations import ACT2FN from transformers.cache_utils import ( Cache, DynamicCache, - SlidingWindowCache, StaticCache, ) from transformers.generation import GenerationMixin @@ -31,6 +30,14 @@ from transformers.utils import ( from .configuration_qwen2_5_vl import Qwen2_5_VLConfig, Qwen2_5_VLVisionConfig +# TODO(Steven): SlidingWindowCache was removed in transformers v5. Define a placeholder so isinstance checks +# always return False (which is the correct behavior when no sliding window cache is in use). +class _SlidingWindowCachePlaceholder: + pass + + +SlidingWindowCache = _SlidingWindowCachePlaceholder + if is_flash_attn_2_available(): from flash_attn import flash_attn_func, flash_attn_varlen_func from flash_attn.layers.rotary import apply_rotary_emb