Update vision.py

This commit is contained in:
Daniel Han 2025-10-01 04:15:14 -07:00
commit cc810e17cb

View file

@ -709,6 +709,9 @@ class FastBaseModel:
model.config.update({"unsloth_version" : __version__})
pass
patch_saving_functions(model, vision = True)
if tokenizer is None:
del model
raise RuntimeError("Unsloth: The tokenizer is weirdly not loaded? Please check if there is one.")
patch_saving_functions(tokenizer, vision = True)
# Fix gradient accumulation