Skip to content

Commit 1a17945

Browse files
committed
Update loader.py
1 parent 87363a6 commit 1a17945

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

unsloth/models/loader.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -497,14 +497,20 @@ def from_pretrained(
497497
raise RuntimeError("Unsloth: Pixtral only works on transformers >= 4.49.0." + LATEST)
498498
elif "qwen2.5" in model_name.lower() and transformers_version < Version("4.49.0"):
499499
raise RuntimeError("Unsloth: Qwen 2.5 only works on transformers >= 4.49.0." + LATEST)
500-
elif "aya-vision" in model_name.lower() and transformers_version < Version("4.50.0.dev0"):
501-
raise RuntimeError("Unsloth: Aya Vision only works on transformers >= 4.50.0." + NIGHTLY)
500+
elif "aya-vision" in model_name.lower():
501+
# Disable compiling for now - errors out!
502+
os.environ["UNSLOTH_COMPILE_DISABLE"] = "1"
503+
if transformers_version < Version("4.50.0.dev0"):
504+
raise RuntimeError("Unsloth: Aya Vision only works on transformers >= 4.50.0." + NIGHTLY)
502505
elif "gemma-3" in model_name.lower() and transformers_version < Version("4.50.0.dev0"):
503506
raise RuntimeError("Unsloth: Gemma 3 only works on transformers >= 4.50.0." + NIGHTLY)
504507
elif "c4ai-command-a-03-2025" in model_name.lower() and transformers_version < Version("4.50.0.dev0"):
505508
raise RuntimeError("Unsloth: Cohere's Command model only works on transformers >= 4.50.0." + NIGHTLY)
506-
elif "granite-vision" in model_name.lower() and transformers_version < Version("4.50.0.dev0"):
507-
raise RuntimeError("Unsloth: Granite Vision only works on transformers >= 4.50.0." + NIGHTLY)
509+
elif "granite-vision" in model_name.lower():
510+
# Disable compiling for now - errors out!
511+
os.environ["UNSLOTH_COMPILE_DISABLE"] = "1"
512+
if transformers_version < Version("4.50.0.dev0"):
513+
raise RuntimeError("Unsloth: Granite Vision only works on transformers >= 4.50.0." + NIGHTLY)
508514
elif "olmo-2" in model_name.lower() and transformers_version < Version("4.50.0.dev0"):
509515
raise RuntimeError("Unsloth: OLMo-2 only works on transformers >= 4.50.0." + NIGHTLY)
510516
pass

0 commit comments

Comments
 (0)