Add torchvision upgrade hint to mismatch ImportError (#4067)

Co-authored-by: Daniel Hanchen <danielhanchen@users.noreply.github.com>
This commit is contained in:
Daniel Han 2026-02-15 19:36:16 -08:00 committed by GitHub
commit 61c8ea6342

View file

@ -689,6 +689,7 @@ def torchvision_compatibility_check():
f"Unsloth: torch=={torch_version_raw} requires "
f"torchvision>={required_tv_str}, "
f"but found torchvision=={torchvision_version_raw}. "
f'Try updating torchvision via `pip install --upgrade "torchvision>={required_tv_str}"`. '
f"Please refer to https://pytorch.org/get-started/previous-versions/ "
f"for more information."
)