diff --git a/backend/go/stablediffusion-ggml/Makefile b/backend/go/stablediffusion-ggml/Makefile index 51f087141..9aa74c27f 100644 --- a/backend/go/stablediffusion-ggml/Makefile +++ b/backend/go/stablediffusion-ggml/Makefile @@ -8,7 +8,7 @@ JOBS?=$(shell nproc --ignore=1) # stablediffusion.cpp (ggml) STABLEDIFFUSION_GGML_REPO?=https://github.com/leejet/stable-diffusion.cpp -STABLEDIFFUSION_GGML_VERSION?=b0179181069254389ccad604e44f17a2c25b4094 +STABLEDIFFUSION_GGML_VERSION?=fce6afcc6a3250a8e17923608922d2a99b339b47 CMAKE_ARGS+=-DGGML_MAX_NAME=128 diff --git a/backend/go/stablediffusion-ggml/gosd.cpp b/backend/go/stablediffusion-ggml/gosd.cpp index b2026fdb3..4a2e01da4 100644 --- a/backend/go/stablediffusion-ggml/gosd.cpp +++ b/backend/go/stablediffusion-ggml/gosd.cpp @@ -43,6 +43,8 @@ const char* sample_method_str[] = { "tcd", }; +static_assert(std::size(sample_method_str) == SAMPLE_METHOD_COUNT, "sample method mismatch"); + // Names of the sigma schedule overrides, same order as sample_schedule in stable-diffusion.h const char* schedulers[] = { "default", @@ -51,8 +53,11 @@ const char* schedulers[] = { "exponential", "ays", "gits", + "smoothstep", }; +static_assert(std::size(schedulers) == SCHEDULE_COUNT, "schedulers mismatch"); + sd_ctx_t* sd_c; // Moved from the context (load time) to generation time params scheduler_t scheduler = scheduler_t::DEFAULT;