Skip to content

Commit ccb6b0a

Browse files
authored
feat: add __index_timestep_zero__ support (#1146)
1 parent df4efe2 commit ccb6b0a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

qwen_image.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,11 +561,13 @@ namespace Qwen {
561561
: GGMLRunner(backend, offload_params_to_cpu) {
562562
qwen_image_params.num_layers = 0;
563563
qwen_image_params.zero_cond_t = zero_cond_t;
564-
LOG_DEBUG("zero_cond_t: %d", zero_cond_t);
565564
for (auto pair : tensor_storage_map) {
566565
std::string tensor_name = pair.first;
567566
if (tensor_name.find(prefix) == std::string::npos)
568567
continue;
568+
if (tensor_name.find("__index_timestep_zero__") != std::string::npos) {
569+
qwen_image_params.zero_cond_t = true;
570+
}
569571
size_t pos = tensor_name.find("transformer_blocks.");
570572
if (pos != std::string::npos) {
571573
tensor_name = tensor_name.substr(pos); // remove prefix
@@ -580,6 +582,9 @@ namespace Qwen {
580582
}
581583
}
582584
LOG_INFO("qwen_image_params.num_layers: %ld", qwen_image_params.num_layers);
585+
if (qwen_image_params.zero_cond_t) {
586+
LOG_INFO("use zero_cond_t");
587+
}
583588
qwen_image = QwenImageModel(qwen_image_params);
584589
qwen_image.init(params_ctx, tensor_storage_map, prefix);
585590
}

stable-diffusion.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,7 @@ class StableDiffusionGGML {
750750
}
751751
ignore_tensors.insert("model.diffusion_model.__x0__");
752752
ignore_tensors.insert("model.diffusion_model.__32x32__");
753+
ignore_tensors.insert("model.diffusion_model.__index_timestep_zero__");
753754

754755
if (vae_decode_only) {
755756
ignore_tensors.insert("first_stage_model.encoder");

0 commit comments

Comments
 (0)