Update infer_flashvsr_tiny.py

This commit is contained in:
smthemex
2025-10-27 08:53:31 +08:00
committed by GitHub
parent d0125b4b27
commit d85238d8e8
@@ -125,6 +125,10 @@ def prepare_input_tensor(path: str, scale: float = 4,fps=30, dtype=torch.bfloat1
if isinstance(path,torch.Tensor):
total,h0,w0,_ = path.shape
if total == 1:
print("got image,repeating to 25 frames")
path = path.repeat(25, 1, 1, 1)
total=25
sW, sH, tW, tH = compute_scaled_and_target_dims(w0, h0, scale=scale, multiple=128)
pil_list=tensor2pillist(path)