Skip to content

Commit e23275e

Browse files
committed
Update vision.py
1 parent 85f7ee1 commit e23275e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

unsloth/models/vision.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,9 @@ def from_pretrained(
709709
model.config.update({"unsloth_version" : __version__})
710710
pass
711711
patch_saving_functions(model, vision = True)
712+
if tokenizer is None:
713+
del model
714+
raise RuntimeError("Unsloth: The tokenizer is weirdly not loaded? Please check if there is one.")
712715
patch_saving_functions(tokenizer, vision = True)
713716

714717
# Fix gradient accumulation

0 commit comments

Comments
 (0)