From c01d9e700823fdcae1bb0cad5e3e983635ed2b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20du=20Hamel?= Date: Wed, 30 Oct 2024 20:18:38 +0100 Subject: [PATCH] fix posix compile --- examples/cli/main.cpp | 2 +- stable-diffusion.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/cli/main.cpp b/examples/cli/main.cpp index d7ae4da3..d0cc07ab 100644 --- a/examples/cli/main.cpp +++ b/examples/cli/main.cpp @@ -1050,7 +1050,7 @@ int main(int argc, const char* argv[]) { params.slg_scale, params.skip_layer_start, params.skip_layer_end, - step_callback); + (step_callback_t)step_callback); } else { sd_image_t input_image = {(uint32_t)params.width, (uint32_t)params.height, diff --git a/stable-diffusion.h b/stable-diffusion.h index 8b895f2c..fe36e63f 100644 --- a/stable-diffusion.h +++ b/stable-diffusion.h @@ -149,7 +149,7 @@ SD_API sd_ctx_t* new_sd_ctx(const char* model_path, SD_API void free_sd_ctx(sd_ctx_t* sd_ctx); -typedef void (*step_callback_t)(int, struct ggml_tensor*, enum SDVersion); +typedef void (*step_callback_t)(int, struct ggml_tensor*, int); SD_API sd_image_t* txt2img(sd_ctx_t* sd_ctx, const char* prompt,