From 65891d74cc1ae4fdb4b64c560cacd1e29628d7b3 Mon Sep 17 00:00:00 2001 From: Roj234 <82699138+roj234@users.noreply.github.com> Date: Thu, 5 Feb 2026 00:49:05 +0900 Subject: [PATCH] fix: avoid the issue of NaN for qwen-image on certain devices (#1249) --- qwen_image.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qwen_image.hpp b/qwen_image.hpp index dfa5397..3044eb4 100644 --- a/qwen_image.hpp +++ b/qwen_image.hpp @@ -212,7 +212,7 @@ namespace Qwen { blocks["txt_norm1"] = std::shared_ptr(new LayerNorm(dim, eps, false)); blocks["txt_norm2"] = std::shared_ptr(new LayerNorm(dim, eps, false)); - blocks["txt_mlp"] = std::shared_ptr(new FeedForward(dim, dim, 4, FeedForward::Activation::GELU)); + blocks["txt_mlp"] = std::shared_ptr(new FeedForward(dim, dim, 4, FeedForward::Activation::GELU, true)); blocks["attn"] = std::shared_ptr(new QwenImageAttention(dim, attention_head_dim,