diff --git a/lerobot/common/policies/smolvla/modeling_smolvla.py b/lerobot/common/policies/smolvla/modeling_smolvla.py index 65f03cd2..9d72d6aa 100644 --- a/lerobot/common/policies/smolvla/modeling_smolvla.py +++ b/lerobot/common/policies/smolvla/modeling_smolvla.py @@ -656,8 +656,13 @@ class VLAFlowMatching(nn.Module): dtype = action_emb.dtype # Embed timestep using sine-cosine positional encoding with sensitivity in the range [0, 1] time_emb = create_sinusoidal_pos_embedding( - timestep, self.vlm_with_expert.expert_hidden_size, self.config.min_period, self.config.max_period, device=device) - + timestep, + self.vlm_with_expert.expert_hidden_size, + self.config.min_period, + self.config.max_period, + device=device, + ) + time_emb = time_emb.type(dtype=dtype) time_emb = time_emb[:, None, :].expand_as(action_emb)