-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Ticket Type
🐛 Bug Report (Something isn't working)
Environment & System Info
Description
Note that this issue coincides heavily with #2954.
I identified a redundancy in the preprocessing pipeline when evaluating the XVLA policy within the LIBERO environment.
The pipeline instantiates two processor chains:
- Environment Preprocessor: via
make_env_pre_post_processors→make_xvla_libero_pre_post_processors - Policy Preprocessor: via
make_pre_post_processors→make_xvla_pre_post_processors
Both chains currently append XVLAImageNetNormalizeProcessorStep and XVLAAddDomainIdProcessorStep. Because the pipeline executes Env Preprocessor → Policy Preprocessor, these transformations are applied twice to the input observations.
Reproduction / Code Analysis
The duplication occurs in lerobot/policies/xvla/processor_xvla.py.
1. Environment-Specific Processor (make_xvla_libero_pre_post_processors)
Adds normalization and domain ID:
def make_xvla_libero_pre_post_processors() -> tuple[...]:
# ...
pre_processor_steps.extend(
[LiberoProcessorStep(), XVLAImageNetNormalizeProcessorStep(), XVLAAddDomainIdProcessorStep()]
)
# ...- General Policy Processor (make_xvla_pre_post_processors) Also adds normalization and domain ID:
def make_xvla_pre_post_processors(...) -> tuple[...]:
# ...
input_steps = [
# ...
XVLAImageToFloatProcessorStep(),
XVLAImageNetNormalizeProcessorStep(), # DUPLICATE
XVLAAddDomainIdProcessorStep(), # DUPLICATE
# ...
]This leads to double normalization which in turns leads to erroneous input values and redundant processing.
Suggested Fix
Remove the general XVLA steps from the environment-specific processor (make_xvla_libero_pre_post_processors). It should likely only handle LiberoProcessorStep and leave the standard normalization to the policy processor.
def make_xvla_libero_pre_post_processors() -> tuple[...]:
# ...
# Removed XVLAImageNetNormalizeProcessorStep and XVLAAddDomainIdProcessorStep
pre_processor_steps.extend(
[LiberoProcessorStep()]
)
# ...Additional Remarks
Currently this issue is mitigated when directly evaluating the pre-trained lerobot/xvla-libero checkpoint available on huggingface as the checkpoint there does not include the XVLAImageToFloatProcessorStep and the XVLAImageNetNormalizeProcessorStep (which I think is incorrect, see #2954).
When I first finetuned lerobot/xvla-libero on LIBERO with the additional XVLAImageToFloatProcessorStep and the XVLAImageNetNormalizeProcessorStep steps in the preprocessing pipeline and then evaluated this model I ran into the double normalization error which led to negative input values.
Context & Reproduction
No response
Relevant logs or stack trace
Checklist
- I have searched existing tickets to ensure this isn't a duplicate.
- I am using the latest version of the
mainbranch. - I have verified this is not an environment-specific problem.
Additional Info / Workarounds
No response