From 477af879617829972a03192ef86f25219d8f2cf7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 11:43:53 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- unsloth/models/rl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py index 1427ca747f..80ddbf19a4 100644 --- a/unsloth/models/rl.py +++ b/unsloth/models/rl.py @@ -1587,6 +1587,7 @@ def _patch_prepare_multimodal_messages(): # Also patch in grpo_trainer module if imported try: import trl.trainer.grpo_trainer as _gt + if hasattr(_gt, "prepare_multimodal_messages"): _gt.prepare_multimodal_messages = _safe_prepare_multimodal_messages except ImportError: