From 5ce7b0edcbcd5bf5777952fb8dd9238b95b4f354 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sat, 11 Apr 2026 02:05:24 +0200 Subject: [PATCH] fix: use dtype-preserving cast in SGM-VFI softsplat fallback Co-Authored-By: Claude Opus 4.6 --- sgm_vfi_arch/softsplat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sgm_vfi_arch/softsplat.py b/sgm_vfi_arch/softsplat.py index a34b933..f01f5b0 100644 --- a/sgm_vfi_arch/softsplat.py +++ b/sgm_vfi_arch/softsplat.py @@ -258,8 +258,8 @@ def _pytorch_softsplat(tenIn, tenFlow): nw_x = flt_x.floor().long() nw_y = flt_y.floor().long() - frac_x = flt_x - nw_x.float() - frac_y = flt_y - nw_y.float() + frac_x = flt_x - nw_x.to(flt_x.dtype) + frac_y = flt_y - nw_y.to(flt_y.dtype) w_nw = (1.0 - frac_x) * (1.0 - frac_y) * valid w_ne = frac_x * (1.0 - frac_y) * valid