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
Trim trainer.py import-fix comment to one line
Daniel Han23550a8e3814
diff --git a/unsloth/trainer.py b/unsloth/trainer.pyindex d26389424c1..01b8822bd53 100644--- a/unsloth/trainer.py+++ b/unsloth/trainer.py@@ -23,11 +23,8 @@ from functools import wrapsimport trlimport inspectfrom trl import SFTTrainer-# Import via the concrete _utils module instead of the partially-initialized-# `unsloth` namespace. The MLX-aware `unsloth/__init__.py` loads the GPU-# surface via `from ._gpu_init import *`, which transitively triggers-# `from .trainer import *` BEFORE the star export has propagated back to-# `unsloth`, so `from . import is_bfloat16_supported` raises at import time.++# why: bypass partially-initialised unsloth ns during _gpu_init loadfrom .models._utils import is_bfloat16_supportedfrom unsloth.utils import (configure_padding_free,