From 32d97e24f259404deb559d0917396a645876e1b7 Mon Sep 17 00:00:00 2001 From: leejet Date: Fri, 26 Dec 2025 21:50:57 +0800 Subject: [PATCH 1/2] add __index_timestep_zero__ support --- qwen_image.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qwen_image.hpp b/qwen_image.hpp index bbbd91bc5..9c095a9a0 100644 --- a/qwen_image.hpp +++ b/qwen_image.hpp @@ -561,11 +561,13 @@ namespace Qwen { : GGMLRunner(backend, offload_params_to_cpu) { qwen_image_params.num_layers = 0; qwen_image_params.zero_cond_t = zero_cond_t; - LOG_DEBUG("zero_cond_t: %d", zero_cond_t); for (auto pair : tensor_storage_map) { std::string tensor_name = pair.first; if (tensor_name.find(prefix) == std::string::npos) continue; + if (tensor_name.find("__index_timestep_zero__") != std::string::npos) { + qwen_image_params.zero_cond_t = true; + } size_t pos = tensor_name.find("transformer_blocks."); if (pos != std::string::npos) { tensor_name = tensor_name.substr(pos); // remove prefix @@ -580,6 +582,9 @@ namespace Qwen { } } LOG_INFO("qwen_image_params.num_layers: %ld", qwen_image_params.num_layers); + if (qwen_image_params.zero_cond_t) { + LOG_INFO("use zero_cond_t"); + } qwen_image = QwenImageModel(qwen_image_params); qwen_image.init(params_ctx, tensor_storage_map, prefix); } From 38cdadb2357c8d62d386eddab4e1d19c5cb9c42d Mon Sep 17 00:00:00 2001 From: leejet Date: Fri, 26 Dec 2025 21:58:31 +0800 Subject: [PATCH 2/2] ignore __index_timestep_zero__ --- stable-diffusion.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stable-diffusion.cpp b/stable-diffusion.cpp index 4b1c00438..58d420415 100644 --- a/stable-diffusion.cpp +++ b/stable-diffusion.cpp @@ -750,6 +750,7 @@ class StableDiffusionGGML { } ignore_tensors.insert("model.diffusion_model.__x0__"); ignore_tensors.insert("model.diffusion_model.__32x32__"); + ignore_tensors.insert("model.diffusion_model.__index_timestep_zero__"); if (vae_decode_only) { ignore_tensors.insert("first_stage_model.encoder");