From 9860a9281c0e1962143a9d09eb62449e3c67d658 Mon Sep 17 00:00:00 2001 From: Mohammed Ali Chherawalla Date: Sun, 22 Nov 2026 19:02:05 +0530 Subject: [PATCH 1/7] docs: add Off Grid AI to applications and UIs (#2372) --- docs/ecosystem.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ecosystem.md b/docs/ecosystem.md index dc150c2e..f5a4fd78 100644 --- a/docs/ecosystem.md +++ b/docs/ecosystem.md @@ -30,3 +30,4 @@ applications that integrate it as an image generation backend. - [NodeTool](https://github.com/nodetool-ai/nodetool) - [Quo](https://github.com/quo-ai/quo) - [Prisme](https://github.com/d3Ita/prisme) +- [Off Grid AI](https://github.com/off-grid-ai/OGAD) From f0816c9adec7e4905eb846a28323eb3f2a61161c Mon Sep 17 00:00:00 2001 From: adamjrichter Date: Sun, 22 Nov 2026 05:36:26 -0800 Subject: [PATCH 2/7] fix: delete 2 unused functions, fixing linking against shared libggml-1.0.0 (#2363) --- src/core/ggml_compat.cpp | 11 -------- src/core/ggml_compat.h | 7 ----- src/core/ggml_extend_backend.cpp | 44 -------------------------------- src/core/ggml_extend_backend.h | 4 --- 4 files changed, 66 deletions(-) diff --git a/src/core/ggml_compat.cpp b/src/core/ggml_compat.cpp index 061b3370..f6e8e7fc 100644 --- a/src/core/ggml_compat.cpp +++ b/src/core/ggml_compat.cpp @@ -151,17 +151,6 @@ bool ggml_graph_cpy_use_counts(const ggml_cgraph* src, ggml_cgraph* dst) { } return true; } - -ggml_status ggml_backend_graph_compute_async_range(ggml_backend_t backend, ggml_cgraph* graph, int first, int last) { - if (!backend || !graph || first < 0 || last < first || last > graph->n_nodes) { - return GGML_STATUS_FAILED; - } - if (first == last) { - return GGML_STATUS_SUCCESS; - } - auto view = ggml_graph_view(graph, first, last); - return ggml_backend_graph_compute_async(backend, &view); -} #endif #ifdef SD_USE_UPSTREAM_GGML diff --git a/src/core/ggml_compat.h b/src/core/ggml_compat.h index 9f64262f..9a367a8b 100644 --- a/src/core/ggml_compat.h +++ b/src/core/ggml_compat.h @@ -29,13 +29,6 @@ bool ggml_graph_cpy_mapped(const struct ggml_cgraph* src, struct ggml_cgraph* ds // This preserves external consumers when constructing an inference graph segment. bool ggml_graph_cpy_use_counts(const struct ggml_cgraph* src, struct ggml_cgraph* dst); -// Executes nodes [first, last) with the original graph's use counts. No graph ownership -// is transferred. Tensor storage must already be allocated; invalid bounds fail. -enum ggml_status ggml_backend_graph_compute_async_range(ggml_backend_t backend, - struct ggml_cgraph* graph, - int first, - int last); - #else #error "Patched ggml requires ggml-graph.h; select SD_USE_UPSTREAM_GGML for upstream compatibility" #endif diff --git a/src/core/ggml_extend_backend.cpp b/src/core/ggml_extend_backend.cpp index 70f2ae2e..fa4a3efc 100644 --- a/src/core/ggml_extend_backend.cpp +++ b/src/core/ggml_extend_backend.cpp @@ -638,50 +638,6 @@ void sd_backend_clear_buffer_cache(ggml_backend_t backend) { } } -ggml_status sd_backend_graph_compute_with_eval_callback(ggml_backend_t backend, - ggml_cgraph* gf, - sd_graph_eval_callback_t callback_eval, - void* callback_eval_user_data) { - if (callback_eval == nullptr) { - return ggml_backend_graph_compute(backend, gf); - } - - ggml_status status = GGML_STATUS_SUCCESS; - const int n_nodes = ggml_graph_n_nodes(gf); - bool stopped = false; - - for (int j0 = 0; j0 < n_nodes; ++j0) { - ggml_tensor* t = ggml_graph_node(gf, j0); - bool need = callback_eval(t, true, callback_eval_user_data); - int j1 = j0; - - while (!need && j1 < n_nodes - 1) { - t = ggml_graph_node(gf, ++j1); - need = callback_eval(t, true, callback_eval_user_data); - } - - status = ggml_backend_graph_compute_async_range(backend, gf, j0, j1 + 1); - if (status != GGML_STATUS_SUCCESS) { - break; - } - - ggml_backend_synchronize(backend); - - if (need && !callback_eval(t, false, callback_eval_user_data)) { - stopped = true; - break; - } - - j0 = j1; - } - - ggml_backend_synchronize(backend); - if (stopped && status == GGML_STATUS_SUCCESS) { - status = GGML_STATUS_ABORTED; - } - return status; -} - const char* sd_get_system_info() { static std::string cache_info = []() -> std::string { ggml_backend_load_all_once(); diff --git a/src/core/ggml_extend_backend.h b/src/core/ggml_extend_backend.h index 037ef0d8..a535ab98 100644 --- a/src/core/ggml_extend_backend.h +++ b/src/core/ggml_extend_backend.h @@ -99,10 +99,6 @@ bool sd_backend_cpu_set_n_threads(ggml_backend_t backend_cpu, int n_threads); void sd_backend_set_buffer_cache_enabled(ggml_backend_t backend, bool enabled); void sd_backend_clear_buffer_cache(ggml_backend_t backend); -ggml_status sd_backend_graph_compute_with_eval_callback(ggml_backend_t backend, - ggml_cgraph* gf, - sd_graph_eval_callback_t callback_eval, - void* callback_eval_user_data); std::string sd_backend_resolve_name(const std::string& name); bool sd_parse_backend_assignment(const std::string& spec, SDBackendAssignment* assignment, std::string* error); bool sd_parse_flash_attention_assignment(const std::string& spec, SDBackendAssignment* assignment, std::string* error); From a852f494c56ba616d8aa41ce5c3a2dba219e3aa8 Mon Sep 17 00:00:00 2001 From: farawayso Date: Sun, 22 Nov 2026 21:42:25 +0800 Subject: [PATCH 3/7] docs: troubleshooting for Windows ROCm 0xC0000135 (STATUS_DLL_NOT_FOUND) (#2356) --- docs/troubleshooting.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index c667cd4b..c849ce10 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -51,3 +51,32 @@ If the problem persists after trying the relevant steps above, [submit a bug report](https://github.com/leejet/stable-diffusion.cpp/issues/new?template=bug_report.yml). Include your full command, backend and hardware, model and weight format, logs, and the scale values you tried with their results. + +## Windows: process exits immediately with 0xC0000135 (STATUS_DLL_NOT_FOUND) + +`sd-cli.exe` / `sd-server.exe` from the Windows ROCm prebuilt may exit with +`0xC0000135` (`STATUS_DLL_NOT_FOUND`) and no output when the HIP runtime is +not on `PATH`. `stable-diffusion.dll` statically imports `hipblas.dll` and +`libhipblaslt.dll`, but the release archive only bundles `amd_comgr.dll`, +`amdhip64_7.dll` and `rocm_kpack.dll`. This is a loader failure, unrelated to +`--audio-vae` or other generation options; `0xC000001D` +(`STATUS_ILLEGAL_INSTRUCTION`) would instead indicate a CPU instruction issue. + +Fix: prepend the ROCm SDK `bin` directories to `PATH` — with the Python ROCm +wheels these are `\Lib\site-packages\_rocm_sdk_libraries\bin` and +`_rocm_sdk_core\bin`. Do not copy individual DLLs: `rocblas.dll` and +`libhipblaslt.dll` also need their sibling `rocblas\` and `hipblaslt\` data +directories. + +Verify: + +```powershell +.\sd-cli.exe --version +'0x{0:X8}' -f $LASTEXITCODE +``` + +Expect the version string and `0x00000000`. If it still fails, inspect the +whole DLL chain (`sd-cli.exe` -> `stable-diffusion.dll` -> ...): `dumpbin +/dependents` lists only one image's direct imports, so use +[Dependencies](https://github.com/lucasg/Dependencies) or also check +`stable-diffusion.dll` to find the missing module. From 56d95bfa12a5ee6ef707ae56a9ae2ff09fca92af Mon Sep 17 00:00:00 2001 From: linzch3 Date: Sun, 22 Nov 2026 08:51:19 -0500 Subject: [PATCH 4/7] fix: default asym_w4a8_int8 group_size to 16 like ComfyUI (#2388) --- src/model_io/safetensors_io.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/model_io/safetensors_io.cpp b/src/model_io/safetensors_io.cpp index 05860626..29b94eb8 100644 --- a/src/model_io/safetensors_io.cpp +++ b/src/model_io/safetensors_io.cpp @@ -147,6 +147,10 @@ static bool read_comfy_quant_config(std::ifstream& file, config.convrot = true; config.group_size = json.value("convrot_groupsize", 256); } + if (config.format == "asym_w4a8_int8") { + // ComfyUI defaults the W4A8 weight group size to 16 when the key is missing. + config.weight_group_size = json.value("group_size", 16); + } } catch (const std::exception&) { set_error(error, "parsing ComfyUI quantization metadata tensor failed: '" + tensor_name + "'"); return false; From 6874e490c81d694543cf139f4d55744237ff72b0 Mon Sep 17 00:00:00 2001 From: losewayy Date: Sun, 22 Nov 2026 21:58:30 +0800 Subject: [PATCH 5/7] perf(vae): batch spatial padding in Hunyuan causal convolutions (#2374) --- src/model/vae/hunyuan_vae.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/model/vae/hunyuan_vae.hpp b/src/model/vae/hunyuan_vae.hpp index ff2b2bb6..567a7043 100644 --- a/src/model/vae/hunyuan_vae.hpp +++ b/src/model/vae/hunyuan_vae.hpp @@ -140,8 +140,15 @@ namespace Hunyuan { } return input; }; - padded = replicate_pad(padded, 0, pad_w, pad_w); - padded = replicate_pad(padded, 1, pad_h, pad_h); + if (pad_w > 0 || pad_h > 0) { + const int64_t frames = padded->ne[2]; + const int64_t channels = padded->ne[3]; + // Keep spatial padding in one outer slice to avoid per-channel CUDA launches. + padded = ggml_reshape_3d(ctx->ggml_ctx, ggml_ext_cont(ctx, padded), padded->ne[0], padded->ne[1], frames * channels); + padded = replicate_pad(padded, 0, pad_w, pad_w); + padded = replicate_pad(padded, 1, pad_h, pad_h); + padded = ggml_reshape_4d(ctx->ggml_ctx, padded, padded->ne[0], padded->ne[1], frames, channels); + } return conv->forward(ctx, padded); } }; From 422b10dbd2b8cf23b369bb3ba3fff709a53bad52 Mon Sep 17 00:00:00 2001 From: losewayy Date: Sun, 22 Nov 2026 22:04:51 +0800 Subject: [PATCH 6/7] perf: reduce CUDA launch overhead in H3 VAE encoding (#2369) --- src/model/vae/minimax_h3_vae.hpp | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/model/vae/minimax_h3_vae.hpp b/src/model/vae/minimax_h3_vae.hpp index 3010cb82..2e3a6e52 100644 --- a/src/model/vae/minimax_h3_vae.hpp +++ b/src/model/vae/minimax_h3_vae.hpp @@ -100,8 +100,15 @@ namespace MiniMaxH3VAE { return value; }; - x = reflect_pad(x, 0, std::get<2>(temporal_padding)); - x = reflect_pad(x, 1, std::get<1>(temporal_padding)); + if (std::get<1>(temporal_padding) != 0 || std::get<2>(temporal_padding) != 0) { + const int64_t frames = x->ne[2]; + const int64_t channels = x->ne[3]; + // Keep spatial padding in one outer slice to avoid per-channel CUDA launches. + x = ggml_reshape_3d(ctx->ggml_ctx, ggml_ext_cont(ctx, x), x->ne[0], x->ne[1], frames * channels); + x = reflect_pad(x, 0, std::get<2>(temporal_padding)); + x = reflect_pad(x, 1, std::get<1>(temporal_padding)); + x = ggml_reshape_4d(ctx->ggml_ctx, x, x->ne[0], x->ne[1], frames, channels); + } int temporal_pad = std::get<0>(temporal_padding) * 2; if (temporal_pad > 0) { x = ggml_ext_pad_ext(ctx, @@ -167,10 +174,14 @@ namespace MiniMaxH3VAE { ggml_tensor* forward(GGMLRunnerContext* ctx, ggml_tensor* x) { if (spatial_stride == 2) { GGML_ASSERT(x->ne[0] > 1 && x->ne[1] > 1); - auto right = ggml_ext_slice(ctx, x, 0, x->ne[0] - 2, x->ne[0] - 1); - x = ggml_concat(ctx->ggml_ctx, x, right, 0); - auto bottom = ggml_ext_slice(ctx, x, 1, x->ne[1] - 2, x->ne[1] - 1); - x = ggml_concat(ctx->ggml_ctx, x, bottom, 1); + const int64_t frames = x->ne[2]; + const int64_t channels = x->ne[3]; + x = ggml_reshape_3d(ctx->ggml_ctx, ggml_ext_cont(ctx, x), x->ne[0], x->ne[1], frames * channels); + auto right = ggml_ext_slice(ctx, x, 0, x->ne[0] - 2, x->ne[0] - 1); + x = ggml_concat(ctx->ggml_ctx, x, right, 0); + auto bottom = ggml_ext_slice(ctx, x, 1, x->ne[1] - 2, x->ne[1] - 1); + x = ggml_concat(ctx->ggml_ctx, x, bottom, 1); + x = ggml_reshape_4d(ctx->ggml_ctx, x, x->ne[0], x->ne[1], frames, channels); } return std::dynamic_pointer_cast(blocks["conv"])->forward(ctx, x); } From 9e7eed71e42d2b87ad496b236793b14747c2e9c8 Mon Sep 17 00:00:00 2001 From: Zihao Date: Mon, 23 Nov 2026 01:09:07 +1100 Subject: [PATCH 7/7] docs(server): document browser notification on generation finish (#2318) --- examples/server/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/server/README.md b/examples/server/README.md index 8673eb80..4de714c1 100644 --- a/examples/server/README.md +++ b/examples/server/README.md @@ -114,6 +114,14 @@ total work is unknown. The canvas keeps the submitted output aspect ratio, and stage changes keep the same layout. Editing the next request's resolution does not resize the current preview or result. +Settings will offer **Notify me when generation finishes** (upcoming; requires +a frontend update). When enabled, the UI requests browser notification +permission and shows a notification when a generation job completes, fails, or +is cancelled, so you do not need to watch the tab while waiting. The +preference is saved locally. Notifications require granting browser +notification permission; if permission was previously denied, reset it in the +browser's site settings for this site before turning the setting on. + ### LoRAs To apply a LoRA, open **LoRA**, select a compatible file, and set its