Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
766ce0e
perf: replace qkv materialized chunks with views (#2335)
wbruna Nov 12, 2026
8b1e9df
feat: allow the P-H3-Image text encoder for MiniMax-H3-Image (#2337)
ArtemKo7v Nov 12, 2026
b9d7176
feat: unify text encoder selection across H3 variants (#2340)
leejet Nov 12, 2026
5d78740
feat: support interleaved image prompts for vision LLMs (#2341)
leejet Nov 13, 2026
a59298e
fix: align CUDA extension architectures with ggml (#2347)
leejet Nov 13, 2026
3bad892
perf(cuda): optimize MOSS-Image inference (#2346)
leejet Nov 13, 2026
ce94719
docs: update hipblas build step (#2110)
icedwater Nov 13, 2026
0f8a467
docs: consolidate and simplify HIP build instructions
leejet Nov 13, 2026
4b51674
perf(hip): accelerate flash attention and INT8 projections (#2351)
leejet Nov 14, 2026
b521db4
perf(hip): fuse INT8 SwiGLU quantization and enable gated residual fu…
leejet Nov 14, 2026
85a0b90
docs: document Ninja builds and ccache setup
leejet Nov 14, 2026
ca4e755
docs: reorganize documentation and improve README navigation
leejet Nov 14, 2026
f7120ce
docs: add build directory creation to SYCL build instructions (#2352)
l0caldadmin Nov 14, 2026
6201bcc
docs: standardize model guides and server documentation
leejet Nov 14, 2026
394d210
fix: trim MiniMax-H3 audio to video duration (#2350)
losewayy Nov 14, 2026
5dcfa79
sync: update ggml to 1.0.0 (#2354)
leejet Nov 14, 2026
01c463a
docs: Add TensorStack C# binding (#2359)
saddam213 Nov 15, 2026
532d2c1
refactor(api): adopt opaque options, tensors, and results (#2365)
leejet Nov 15, 2026
0572d3d
Merge upstream master-1106-532d2c1
Vect0rM Nov 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
## Checklist

- [ ] I have read and confirmed this PR follows the [contribution guidelines](https://github.com/leejet/stable-diffusion.cpp/blob/master/CONTRIBUTING.md).
- [ ] If this PR adds or changes model support, I have added or updated its usage guide and relevant model index/README entries following the [model documentation requirements](https://github.com/leejet/stable-diffusion.cpp/blob/master/CONTRIBUTING.md#model-documentation).
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ logs/
*.exe
*.gguf
output*.png
models*
/models*
*.log
preview.png
.claude/
Expand Down
16 changes: 12 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ documentation.
### Documentation and Tooling

* `docs/` - documentation for supported models, build options, behavior, and
workflows.
workflows; start from `docs/README.md`.
* `docs/models/` - model and component usage guides, including LoRAs, adapters,
auxiliary models, and model-specific examples.
* `docs/guides/` - shared usage workflows, configuration, and performance guides.
* `docs/development/` - internal implementation and model integration conventions.
* `scripts/` - development, model processing, build automation, formatting, and
tooling scripts.
* `cmake/` - CMake support modules.
Expand All @@ -115,9 +119,13 @@ documentation.
1. Identify the relevant modules under `src/`.
2. Check whether the change touches the public API in `include/`.
3. Consult relevant `docs/` and examples before changing user-facing behavior.
4. Follow existing local patterns before adding new abstractions.
5. Keep edits scoped to the requested behavior.
6. Run the narrowest useful build, test, or inspection command available.
4. For model or component integrations, read and follow
[the model documentation requirements](CONTRIBUTING.md#model-documentation).
Add or update the usage guide and relevant index/README entries in the same
change. Treat the integration as incomplete until this documentation is included.
5. Follow existing local patterns before adding new abstractions.
6. Keep edits scoped to the requested behavior.
7. Run the narrowest useful build, test, or inspection command available.

Follow `CONTRIBUTING.md` for formatting, naming, PR expectations, dependency
update policy, and security rules. For tokenizer additions, follow its embedded-data
Expand Down
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ file(GLOB SD_LIB_SOURCES CONFIGURE_DEPENDS
"src/*.h"
"src/*.cpp"
"src/*.hpp"
"src/api/*.h"
"src/api/*.cpp"
"src/conditioning/*.h"
"src/conditioning/*.cpp"
"src/conditioning/*.hpp"
Expand Down Expand Up @@ -368,8 +370,15 @@ if (SD_CUDA)
set_property(SOURCE src/core/ggml_extend_backend.cpp APPEND PROPERTY COMPILE_DEFINITIONS SD_USE_CUDA)
if (NOT SD_USE_UPSTREAM_GGML)
include(cmake/cutlass.cmake)
if (TARGET ggml-cuda)
# ggml resolves CUDA architectures in a child directory scope.
get_target_property(CMAKE_CUDA_ARCHITECTURES ggml-cuda CUDA_ARCHITECTURES)
endif()
enable_language(CUDA)
set_target_properties(${SD_LIB} PROPERTIES CUDA_STANDARD 17 CUDA_STANDARD_REQUIRED ON)
set_target_properties(${SD_LIB} PROPERTIES
CUDA_STANDARD 17
CUDA_STANDARD_REQUIRED ON
CUDA_ARCHITECTURES "${CMAKE_CUDA_ARCHITECTURES}")
if (SD_CUDA_CUTLASS_PATH)
target_sources(${SD_LIB} PRIVATE src/core/cuda/cute_attention.cu src/core/cuda/i8_projection.cu src/core/cuda/i8_gated_residual.cu src/core/cuda/i8_gemm.cu src/core/cuda/bf16_gemm.cu)
set_source_files_properties(src/core/cuda/cute_attention.cu src/core/cuda/i8_projection.cu src/core/cuda/i8_gated_residual.cu src/core/cuda/i8_gemm.cu src/core/cuda/bf16_gemm.cu PROPERTIES
Expand Down Expand Up @@ -424,6 +433,9 @@ target_include_directories(${SD_LIB} PUBLIC include)
target_include_directories(${SD_LIB} PRIVATE src src/core)
target_include_directories(${SD_LIB} PUBLIC thirdparty)
target_compile_features(${SD_LIB} PUBLIC c_std_11 cxx_std_17)
set_target_properties(${SD_LIB} PROPERTIES
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON)


if (SD_BUILD_EXAMPLES)
Expand Down
71 changes: 64 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,75 @@ PRs should include:

## Documentation

Write model usage guides in `docs/` for users. Focus on supported weights,
setup, runnable commands, parameter meanings, output behavior, and practical
limits such as memory requirements. Include technical details only when they
help users choose settings or troubleshoot a problem.
Write model and component usage guides in `docs/models/` for users. Focus on
supported weights, setup, runnable commands, parameter meanings, output behavior,
and practical limits such as memory requirements. Include technical details only
when they help users choose settings or troubleshoot a problem.

Put shared usage workflows and configuration in `docs/guides/`, and internal
implementation details and development conventions in `docs/development/`.
Keep build, Docker, and troubleshooting guides at the root of `docs/`.
Link new documentation from [the documentation index](docs/README.md) or
[the model index](docs/models/README.md), as appropriate. Keep supported model
entries and their guide links in the project README.

### Model Documentation

Every new model or component integration must include a user guide in
`docs/models/` in the same PR. For a variant or new task of an existing family,
update that family's guide instead of creating a duplicate page. Add new guides
to the model index, and update the supported-model entries and guide links in
the project README when adding a model family or capability.

Model guides should use the model name as their single top-level heading and
start with a short description of supported tasks and compatibility requirements.
`Model files` and `Usage` are required. Use the following sections in order,
omitting other sections when they have no content:

- `Supported variants` when variants need a separate comparison.
- `Model files`, with component, weights/downloads, CLI option, and requirement
columns. Include tokenizers, projectors, connectors, downloads, conversion, and
required preprocessing.
- `Usage`, with `Web UI` and `CLI` subsections where applicable. Link to the
server's shared Web UI guide and list compatible recipes/components. Group
complete CLI examples by task or variant within this section; do not add a
separate `Quick start` or `Examples` section. Keep API usage in its own
subsection when needed.
- `Options` for model-specific settings.
- `Notes and limitations` for input/output constraints, memory requirements,
and unsupported functionality.

Follow the [model example conventions](docs/models/README.md#example-conventions)
for working directories and shell syntax. Provide Windows PowerShell and
Linux/macOS forms of executable examples, using `.\bin\Release\sd-cli.exe` and
`./bin/sd-cli` respectively from the build directory. Use the corresponding
server paths for Web UI startup. Keep backend-specific examples clearly labeled.
Use multiline commands with mode and
model components first, followed by inputs/prompts, sampling settings, dimensions,
other model options, memory/backend options, and output/seed settings. Preserve
checkpoint-specific values when reorganizing existing examples. Keep example
images next to their commands, and update links when section anchors change.
Keep shared Web UI operating instructions in `examples/server/README.md` and
link to them from model guides. Document shared settings by linking to
`docs/guides/`. Only describe Web UI
recipes and capabilities that already exist; documentation cleanup alone is not
a reason to add or change a built-in recipe.

Before submitting, check download links, relative links, command paths, CLI
options, and any recipe/component mappings against the implementation. Report
which examples were actually run and which were only inspected in the PR's
verification notes.

Keep tensor layouts, internal class names, kernel implementation details,
algorithm derivations, and development history out of usage guides. Keep task-specific
profiling logs, numerical comparison procedures, and test artifacts local, and
summarize relevant verification results in the PR description.

## README UI Listings
## Application and UI Listings

The [UIs list in the README](README.md#uis) only includes open-source projects that use `stable-diffusion.cpp` as a backend. Do not submit PRs to add closed-source UIs.
The [applications and UIs list](docs/ecosystem.md#applications-and-uis) only
includes open-source projects that use `stable-diffusion.cpp` as a backend.
Do not submit PRs to add closed-source applications or UIs.

## Server Recipes

Expand Down Expand Up @@ -76,7 +132,8 @@ Naming conventions:

Some older code in the project may not fully follow the current conventions. Please do not submit PRs that only rewrite existing code to match style rules.

When adding or modifying model implementations, follow the model config and weight detection conventions in [docs/model_config.md](docs/model_config.md).
When adding or modifying model implementations, follow the
[model config and weight detection conventions](docs/development/model_config.md).

## Tokenizer Data

Expand Down
Loading
Loading