stable-diffusion.cpp/docs
Claude df766ab54a
Merge upstream/master (leejet/stable-diffusion.cpp 58bb3c1) into fork-pull
Brings in the 73 upstream commits since b13a482 (2026-10-20 to 2026-11-05):
cancellation of running server jobs (#2190), recipe based model management
and idempotent model loading (#2176, #2188, #2217, #2221), ADetailer in the
server (#2164), generation metadata returned with the core results (#2206,
which changes generate_image and generate_video), integrated GPUs in the
automatic memory planning (#2228), discrete GPUs preferred in auto-fit
(#2259), Vulkan capacity checks retried after reclaiming memory (#2256),
the layer split fix across CUDA devices (#2262), RPC devices in
--list-devices (#2182), new models and many speed-ups (FLUX.3, Fibo 2.0,
MiniMax-H3, P-H3-Image, MOSS, Z-Image control-net, INT8 CUDA fusions),
Node 24 and ccache in the workflows, a CUTLASS submodule for the CUDA build,
and the ggml sync to 135ce1e.

Conflicts resolved by hand in 25 files, keeping both sides:

- include/stable-diffusion.h, src/stable-diffusion.cpp,
  src/core/ggml_runner.cpp, src/pipeline/diffusion_engine.cpp,
  src/pipeline/image.cpp: upstream's result API stays (generate_image and
  generate_video fill a result out-parameter, free_sd_image_generation_result
  releases it); the fork's classified errors, exception barrier and busy
  check wrap it, so a failed call still records its reason and clears the
  result. memory_guard, disable_backend_fallback and multi_gpu follow
  upstream's last sd_ctx_params_t field. A stop on request is logged as
  information, not as an error.
- src/core/backend_fit.cpp: integrated GPUs are enumerated as upstream now
  does; which device becomes the main one is still decided by the fork's
  rules (discrete before integrated, a card seen by both CUDA and Vulkan
  counts once), which cover the case of #2259 as well.
- src/core/ggml_extend_backend.cpp, CMakeLists.txt: the NVIDIA driver is
  still loaded at run time (sd::cuda_driver; the toolkit provides headers
  only), so upstream's cuda_compiled_arch asks the compute capability
  through it and not through <cuda.h>; the CUTLASS include of upstream
  stays.
- src/model_manager.cpp: the CPU memory guard and upstream's capacity
  rechecks (#2183, #2256) both apply.
- examples/server (runtime, main, async_jobs, routes_*): the context keeper
  is still the only owner of the context, and ServerRuntime has no context
  or mutex of its own. Upstream's model catalog (--model-dir, the
  /sdcpp/v1/models routes, recipes) asks the keeper to load and unload
  (ContextKeeper::load, unload, has_model), so a model loaded from the
  catalog gets the same recovery ladder as the one given with -m, built from
  the options of the new model. ADetailer runs with the context and the
  options of the profile in use. The server still starts without a model.
- Cancellation: every job has a CancelToken that the keeper registers only
  while the job generates. POST /sdcpp/v1/jobs/{id}/cancel answers at once
  when called without ?wait=, as upstream does (the job can still be
  generating, with cancel_requested true); with ?wait=N it waits for the end
  of the job and answers 200, or 202 if it is still ending, which is what
  the fork's guardian expects. cancel_requested is always in the job JSON.
- examples/common/common.{h,cpp}: upstream's --list-devices with RPC devices
  and --taesd-preview-only next to the fork's --profile, --memory-guard,
  --multi-gpu and --disable-backend-fallback.
- .github/workflows/build.yml: upstream's Node 24, ccache and CUDA header
  triggers next to the fork's CPU Docker variant, lowercase image names,
  combined CUDA and Vulkan Windows zip and Italian release notes.
  examples/cli and examples/server CMakeLists: profile.cpp and recovery.cpp
  are added to upstream's source lists.
- docs/backend.md, docs/build.md, examples/server/api.md: the sections of
  both sides are kept. The paragraph on how a layer split assigns blocks is
  the fork's, which is what layer_split_partition.cpp does (the first device
  takes blocks until its free memory is used up), not upstream's
  "proportional" wording.

The ggml submodule moves from dc99877 to 135ce1e, the frontend submodule to
fa93429 and the new thirdparty/cutlass submodule is added, all at upstream's
pins. A checkout needs git submodule update --init --recursive.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhZzDBkuuMp1jBf4WtEySC
2026-11-05 14:08:44 +01:00
..
adetailer.md feat(server): add ADetailer support to image generation (#2164) 2026-10-21 23:11:36 +08:00
agenti_indipendenti.md docs: add a guide for independent agents next to the engine 2026-10-14 23:36:14 +02:00
anima.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
animatediff.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
backend.md Merge upstream/master (leejet/stable-diffusion.cpp 58bb3c1) into fork-pull 2026-11-05 14:08:44 +01:00
backend_probe.md fix: benchmark Vulkan direct convolution in auto mode (#2141) 2026-10-15 23:08:30 +08:00
boogu_image.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
build.md Merge upstream/master (leejet/stable-diffusion.cpp 58bb3c1) into fork-pull 2026-11-05 14:08:44 +01:00
caching.md feat: add configurable conditioning cache for all models (#2034) 2026-09-23 22:25:42 +08:00
chroma.md refactor: move model-specific args into model parsers (#1757) 2026-07-06 23:13:18 +08:00
chroma_radiance.md docs: unify model path 2026-07-05 18:31:59 +08:00
convivenza_applicazioni.md docs: la guida per una scheda vista da due backend e per i due avvisi del log 2026-10-17 17:57:39 +02:00
cuda_e_vulkan_stessa_scheda.md docs: la guida per una scheda vista da due backend e per i due avvisi del log 2026-10-17 17:57:39 +02:00
distilled_sd.md feat: SDXS-09 support and update doc (#1356) 2026-04-17 01:11:44 +08:00
docker.md Merge upstream/master (leejet/stable-diffusion.cpp 58bb3c1) into fork-pull 2026-11-05 14:08:44 +01:00
edit.md fix: forward ref_image_args to the video pipeline (#2177) 2026-10-24 00:57:24 +08:00
ernie_image.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
esrgan.md feat: add MoSR upscaler support (#2128) 2026-10-12 22:38:38 +08:00
fibo2.md feat: add Fibo 2.0 Dev and Edit Turbo support (#2180) 2026-10-21 23:32:19 +08:00
flux.md docs: unify model path 2026-07-05 18:31:59 +08:00
flux2.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
flux3.md docs: add flux3 gguf links 2026-10-18 18:12:17 +08:00
generation_metadata.md feat: return generation metadata with core results (#2206) 2026-10-25 03:18:03 +08:00
ggml_extensions.md feat: add custom modulate operator and ConvRot fusion (#2258) 2026-11-02 01:19:28 +08:00
hidream_o1_image.md docs: unify model path 2026-07-05 18:31:59 +08:00
hipBLAS_on_Windows.md ci: update ROCm Windows builds (#1282) 2026-05-16 20:25:38 +08:00
hunyuan_video.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
ideogram4.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
image_preprocessing.md feat(server): add recipe constraints and update generation workspace (#2217) 2026-10-26 01:01:43 +08:00
imatrix.md feat: add imatrix support (#633) 2026-07-01 23:26:37 +08:00
int8_convrot.md refactor: move model-specific operators and fusions into backend extensions (#2253) 2026-11-01 21:18:37 +08:00
integrazione_progetti.md docs: la guida per una scheda vista da due backend e per i due avvisi del log 2026-10-17 17:57:39 +02:00
ip_adapter.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
iris.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
kontext.md docs: unify model path 2026-07-05 18:31:59 +08:00
krea2.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
lcm.md feat: simple openai image generation api compatiple server (#1037) 2025-12-13 13:53:21 +08:00
lens.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
lingbot_video.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
llada_image.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
longcat_image.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
lora.md feat: simple openai image generation api compatiple server (#1037) 2025-12-13 13:53:21 +08:00
ltx2.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
mage_flow.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
ming_image.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
minimax_h3.md feat: MiniMax-H3 latent hires second pass (#2249) 2026-11-05 02:59:04 +08:00
minit2i.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
model_config.md refactor: centralize model factories and defaults (#2198) 2026-10-24 01:03:05 +08:00
moss_image.md docs: update MOSS-Image docs 2026-10-18 16:22:31 +08:00
ovis_image.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
p_h3_image.md feat: add P-H3-Image generation and editing support (#2272) 2026-11-04 23:24:51 +08:00
pe_cache.md perf: cache CPU position embeddings across DiT runners (#2211) 2026-10-25 05:18:30 +08:00
performance.md Merge upstream/master (leejet/stable-diffusion.cpp 58bb3c1) into fork-pull 2026-11-05 14:08:44 +01:00
photo_maker.md feat: simple openai image generation api compatiple server (#1037) 2025-12-13 13:53:21 +08:00
pid.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
pixart.md feat: add PixArt model family support (#2047) 2026-09-25 18:18:55 +08:00
pulid.md chore: move utility scripts under scripts (#1746) 2026-07-05 18:48:18 +08:00
quantization_and_gguf.md feat: simple openai image generation api compatiple server (#1037) 2025-12-13 13:53:21 +08:00
qwen_image.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
qwen_image_2.1.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
qwen_image_edit.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
rpc.md fix: include RPC devices in --list-devices (#2182) 2026-10-21 23:47:50 +08:00
sage_attention.md refactor: move model-specific operators and fusions into backend extensions (#2253) 2026-11-01 21:18:37 +08:00
sd.md refactor: unify runner lifecycles and weight residency (#1940) 2026-09-06 22:30:45 +08:00
sd3.md feat: simple openai image generation api compatiple server (#1037) 2025-12-13 13:53:21 +08:00
sefi_image.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
sensenova_u1.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
studio_testo_a_diffusione.md docs: explain how an AI assistant can use the engine as a tool 2026-10-14 01:03:42 +02:00
taesd.md feat: add --taesd-preview-only to shared context params (#2184) 2026-10-22 22:51:59 +08:00
tokenizers.md refactor: require external Gemma 2 and GPT-OSS tokenizers (#1974) 2026-09-15 01:25:13 +08:00
troubleshooting.md Merge upstream/master (leejet/stable-diffusion.cpp b13a482) into fix_to_claude 2026-10-18 19:51:51 +02:00
wan.md feat: allow grouped temporal decoding for Wan2.2 TI2V 5B (#2196) 2026-10-24 01:09:05 +08:00
z_image.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00
z_image_l2p.md feat: add per-module automatic flash attention selection (#2132) 2026-10-13 22:58:45 +08:00