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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
fix_huggingface_hub
Daniel Han8d44bd35d389
diff --git a/unsloth/__init__.py b/unsloth/__init__.pyindex d10a0f80303..c74b248a830 100644--- a/unsloth/__init__.py+++ b/unsloth/__init__.py@@ -30,16 +30,19 @@ from .import_fixes import (check_fbgemm_gpu_version,torchvision_compatibility_check,fix_diffusers_warnings,+ fix_huggingface_hub,)fix_message_factory_issue()check_fbgemm_gpu_version()torchvision_compatibility_check()fix_diffusers_warnings()+fix_huggingface_hub()del fix_message_factory_issuedel check_fbgemm_gpu_versiondel torchvision_compatibility_checkdel fix_diffusers_warnings+del fix_huggingface_hub# This check is critical because Unsloth optimizes these libraries by modifying# their code at import time. If they're imported first, the original (slower,diff --git a/unsloth/import_fixes.py b/unsloth/import_fixes.pyindex efc7a7f4cd7..f388f4ea8df 100644--- a/unsloth/import_fixes.py+++ b/unsloth/import_fixes.py@@ -539,3 +539,10 @@ def fix_executorch():def fix_diffusers_warnings():# Silence Flax classes are deprecated and will be removed in Diffusers v1.0.0.os.environ["DIFFUSERS_VERBOSITY"] = "error"+++def fix_huggingface_hub():+ # huggingface_hub.is_offline_mode got removed, so add it back+ import huggingface_hub+ if not hasattr(huggingface_hub, "is_offline_mode"):+ huggingface_hub.is_offline_mode = lambda: huggingface_hub.constants.HF_HUB_OFFLINE