From a8f24ea882efff0303787a838c895a357d8078c2 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 18 Mar 2025 04:51:06 -0700 Subject: [PATCH] Update vision.py --- unsloth/models/vision.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py index 9e53176d52..acf999faff 100644 --- a/unsloth/models/vision.py +++ b/unsloth/models/vision.py @@ -126,8 +126,8 @@ def unsloth_base_fast_generate( pass pass key = NUM_LOGITS_TO_KEEP[arch] - # if key is not None and key not in kwargs: - # kwargs[key] = 1 + if key is not None and key not in kwargs: + kwargs[key] = 1 global PROMPT_LOOPKUP if arch not in PROMPT_LOOPKUP: PROMPT_LOOPKUP[arch] = True @@ -146,8 +146,6 @@ def unsloth_base_fast_generate( try: kwargs["pixel_values"] = kwargs["pixel_values"].to(dtype) except: pass - print(args, kwargs, self._old_generate) - # Mixed precision autocast if os.environ.get("UNSLOTH_FORCE_FLOAT32", "0") == "1": autocaster = torch.autocast(device_type = "cuda", dtype = dtype)