Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Add torchvision upgrade hint to mismatch ImportError (#4067)

Daniel Han61c8ea634257
diff --git a/unsloth/import_fixes.py b/unsloth/import_fixes.py
index c7914f39a11..a86ad847794 100644
--- a/unsloth/import_fixes.py
+++ b/unsloth/import_fixes.py
@@ -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."
)