diff --git a/src/lerobot/scripts/train.py b/src/lerobot/scripts/train.py index 21da62bbb..8d0c49bce 100644 --- a/src/lerobot/scripts/train.py +++ b/src/lerobot/scripts/train.py @@ -180,7 +180,7 @@ def train(cfg: TrainPipelineConfig): # Create processors - only provide dataset_stats if not resuming from saved processors processor_kwargs = {} - if not (cfg.resume and cfg.policy.pretrained_path): + if (cfg.policy.pretrained_path and not cfg.resume) or not cfg.policy.pretrained_path: # Only provide dataset_stats when not resuming from saved processor state processor_kwargs["dataset_stats"] = dataset.meta.stats