From a1169ef8da05e9f320f5eb282f1799a7c6b14e8e Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 19 Mar 2025 01:33:43 -0700 Subject: [PATCH] Update vision.py --- unsloth/models/vision.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py index 0569ac1991..10618c1a84 100644 --- a/unsloth/models/vision.py +++ b/unsloth/models/vision.py @@ -169,7 +169,7 @@ def unsloth_base_fast_generate( autocaster = torch.autocast(device_type = "cuda", dtype = dtype) # Prepare LoRA - state_dict = convert_lora_modules(model, dtype = dtype) + state_dict = convert_lora_modules(self, dtype = dtype) # Set compile dynamic shapes torch._dynamo.mark_static(input_ids, 0) @@ -197,7 +197,7 @@ def unsloth_base_fast_generate( kwargs.pop("prompt_lookup_num_tokens", None) output = self._old_generate(*args, **kwargs) finally: - return_lora_modules(model, state_dict, torch.float32) + return_lora_modules(self, state_dict, torch.float32) pass FastBaseModel.for_training(self)