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.

Improve debugging experience (#1512)

Edd9940583287b3
diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py
index a881146692f..acfd0129b55 100644
--- a/unsloth/models/loader.py
+++ b/unsloth/models/loader.py
@@ -446,7 +446,9 @@ class FastVisionModel(FastBaseVisionModel):
if not was_disabled: enable_progress_bars()
- with contextlib.redirect_stdout(open(os.devnull, "w")):
+ with contextlib.redirect_stdout(
+ open(os.devnull, "w") if os.environ.get("UNSLOTH_DISABLE_LOGGER", "0") != "1" else sys.stdout
+ ):
patch_loss_functions(torch_compile = False)
model_types = unsloth_compile_transformers(
model_name = model_name,