From 5c38f8d6ac601b62fd7b8279dd7e4a8b19145729 Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Mon, 18 Aug 2025 20:29:09 -0400 Subject: [PATCH] Fix normal qwen. --- comfy/text_encoders/llama.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/text_encoders/llama.py b/comfy/text_encoders/llama.py index 3ff4ab36e..9d90d5a61 100644 --- a/comfy/text_encoders/llama.py +++ b/comfy/text_encoders/llama.py @@ -403,7 +403,7 @@ class Qwen25_7BVLI(BaseLlama, torch.nn.Module): position_ids[2, start:end] = torch.arange(start, start + max_d, device=embeds.device).unsqueeze(0).repeat(math.ceil((end - start) / max_d), 1).flatten(0)[:end - start] if grid is None: - position_ids = torch.arange(0, embeds.shape[1], device=embeds.device) + position_ids = None return super().forward(x, attention_mask=attention_mask, embeds=embeds, num_tokens=num_tokens, intermediate_output=intermediate_output, final_layer_norm_intermediate=final_layer_norm_intermediate, dtype=dtype, position_ids=position_ids)