try to fix ci compile errors (+1 squashed commits)

Squashed commits:

[d0d49663] fixed log multiline (+1 squashed commits)

Squashed commits:

[81a8befe] try to fix linux build error (+1 squashed commits)

Squashed commits:

[22850dda] try to fix build (+1 squashed commits)

Squashed commits:

[b8294611] missing type
This commit is contained in:
Concedo 2024-03-01 18:15:20 +08:00
parent 040de7d899
commit 2d9a90b652
6 changed files with 52 additions and 38 deletions

View file

@ -15,6 +15,9 @@
#include "unet.hpp"
#include "vae.hpp"
#include <inttypes.h>
#include <cinttypes>
const char* model_version_to_str[] = {
"1.x",
"2.x",
@ -487,7 +490,7 @@ public:
// }
int64_t t1 = ggml_time_ms();
LOG_DEBUG("computing condition graph completed, taking %" PRId64 " ms", t1 - t0);
LOG_DEBUG("computing condition graph completed, taking %d ms", (int)(t1 - t0));
ggml_tensor* result = ggml_dup_tensor(work_ctx, hidden_states);
{
float original_mean = ggml_tensor_mean(hidden_states);
@ -628,7 +631,7 @@ public:
print_ggml_tensor(y);
}
int64_t t1 = ggml_time_ms();
LOG_DEBUG("computing svd condition graph completed, taking %" PRId64 " ms", t1 - t0);
LOG_DEBUG("computing svd condition graph completed, taking %d ms",(int)(t1 - t0));
return {c_crossattn, c_concat, y};
}
@ -1392,7 +1395,7 @@ sd_image_t* txt2img(sd_ctx_t* sd_ctx,
uc_vector = uncond_pair.second; // [adm_in_channels, ]
}
t1 = ggml_time_ms();
LOG_INFO("get_learned_condition completed, taking %" PRId64 " ms", t1 - t0);
LOG_INFO("get_learned_condition completed, taking %d ms", (int)(t1 - t0));
if (sd_ctx->sd->free_params_immediately) {
sd_ctx->sd->cond_stage_model->free_params_buffer();
@ -1446,7 +1449,7 @@ sd_image_t* txt2img(sd_ctx_t* sd_ctx,
sd_ctx->sd->diffusion_model->free_params_buffer();
}
int64_t t3 = ggml_time_ms();
LOG_INFO("generating %" PRId64 " latent images completed, taking %.2fs", final_latents.size(), (t3 - t1) * 1.0f / 1000);
LOG_INFO("generating %d latent images completed, taking %.2fs", final_latents.size(), (t3 - t1) * 1.0f / 1000);
LOG_INFO("decoding %zu latents", final_latents.size());
std::vector<struct ggml_tensor*> decoded_images; // collect decoded images
@ -1458,7 +1461,7 @@ sd_image_t* txt2img(sd_ctx_t* sd_ctx,
decoded_images.push_back(img);
}
int64_t t2 = ggml_time_ms();
LOG_INFO("latent %" PRId64 " decoded, taking %.2fs", i + 1, (t2 - t1) * 1.0f / 1000);
LOG_INFO("latent %d decoded, taking %.2fs", i + 1, (t2 - t1) * 1.0f / 1000);
}
int64_t t4 = ggml_time_ms();
@ -1577,7 +1580,7 @@ sd_image_t* img2img(sd_ctx_t* sd_ctx,
uc_vector = uncond_pair.second; // [adm_in_channels, ]
}
int64_t t2 = ggml_time_ms();
LOG_INFO("get_learned_condition completed, taking %" PRId64 " ms", t2 - t1);
LOG_INFO("get_learned_condition completed, taking %d ms", (int)(t2 - t1));
if (sd_ctx->sd->free_params_immediately) {
sd_ctx->sd->cond_stage_model->free_params_buffer();
}
@ -1710,7 +1713,7 @@ SD_API sd_image_t* img2vid(sd_ctx_t* sd_ctx,
uc_vector = ggml_dup_tensor(work_ctx, c_vector);
int64_t t1 = ggml_time_ms();
LOG_INFO("get_learned_condition completed, taking %" PRId64 " ms", t1 - t0);
LOG_INFO("get_learned_condition completed, taking %d ms", (int)(t1 - t0));
if (sd_ctx->sd->free_params_immediately) {
sd_ctx->sd->clip_vision->free_params_buffer();
}