From be3fd2a4dbb449b92a0667bcaecfdc0969538dad Mon Sep 17 00:00:00 2001 From: cherry-cloud <1615405@qq.com> Date: Sat, 11 Jul 2026 06:57:05 +0800 Subject: [PATCH] [bugfix] avoid duplicate resize for Qwen3-Omni --- swift/template/templates/qwen.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/swift/template/templates/qwen.py b/swift/template/templates/qwen.py index dd02a75ac9..348e3aae9c 100644 --- a/swift/template/templates/qwen.py +++ b/swift/template/templates/qwen.py @@ -860,13 +860,12 @@ def _encode(self, inputs: StdTemplateInputs) -> Dict[str, Any]: else: video_audios_mask.append(False) video_audios_mask = torch.tensor(video_audios_mask) - do_resize = self.version == 'omni_v3' media_inputs = processor( text='', audio=inputs.audios or None, images=inputs.images or None, videos=inputs.videos or None, - do_resize=do_resize, + do_resize=False, return_tensors='pt') media_inputs.pop('input_ids') media_inputs.pop('attention_mask')