seems like a weird numerical precision issue, lets check in runners

This commit is contained in:
raushan
2026-04-14 15:22:09 +02:00
committed by Steven Palma
parent 4e23056b1e
commit c98dba28eb
@@ -260,6 +260,8 @@ class PI0FastPaliGemma(nn.Module):
image = image.to(torch.float32)
image_outputs = self.paligemma.model.get_image_features(image)
features = image_outputs.pooler_output
norm = 2048**0.5
features = features / norm * norm
if features.dtype != out_dtype:
features = features.to(out_dtype)
return features