Sync with upstream master, including Qwen-Image-2.1 support - #15
Conversation
Co-authored-by: leejet <leejet714@gmail.com>
Co-authored-by: leejet <leejet714@gmail.com>
Co-authored-by: leejet <leejet714@gmail.com>
Co-authored-by: leejet <leejet714@gmail.com>
Co-authored-by: leejet <leejet714@gmail.com>
Upstream moved the body of src/stable-diffusion.cpp into src/pipeline/*, so that file is taken wholesale from upstream and our two local guards are re-applied where the code now lives. The img_gen refusal for MiniMax-H3 is already upstream in src/pipeline/image.cpp, so it is dropped here rather than duplicated. The CFG-free guard is not, and moves to src/pipeline/request.cpp beside the other guidance normalisation. Brings in Qwen-Image-2.1 support (leejet#1994), which the prebuilts we publish do not have.
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8609f11320
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const char* embeddings_connectors_path; | ||
| const char* vae_path; | ||
| const char* audio_vae_path; | ||
| const char* audio_encoder_path; |
There was a problem hiding this comment.
Preserve the public context-parameter ABI
When an application built against the previous public header calls sd_ctx_params_init, its sd_ctx_params_t allocation has the old size, but the new library executes *sd_ctx_params = {} using the enlarged layout and writes past that allocation; callers that skip the initializer instead have every field after this insertion misread and eventually read beyond the object in new_sd_ctx. Introduce a size/versioned API rather than enlarging this public by-pointer struct in place.
AGENTS.md reference: AGENTS.md:L71-L76
Useful? React with 👍 / 👎.
| int* num_frames_out, | ||
| sd_audio_t** audio_out); | ||
| sd_audio_t** audio_out, | ||
| int* fps_out); |
There was a problem hiding this comment.
Keep the existing generate_video calling convention
When an already-compiled C client loads the updated shared library, the exported symbol name is unchanged but the caller still supplies only five arguments; the implementation interprets an unspecified register or stack slot as fps_out and, when it appears non-null, writes through that garbage pointer. Preserve the five-argument function and expose the FPS through a new symbol or another backward-compatible mechanism.
AGENTS.md reference: AGENTS.md:L71-L76
Useful? React with 👍 / 👎.
|
|
||
| enum sd_log_level_t { | ||
| SD_LOG_DEBUG, | ||
| SD_LOG_VERBOSE, |
There was a problem hiding this comment.
Preserve the existing log-level enum values
For precompiled callback users, inserting this value changes SD_LOG_INFO/WARN/ERROR from 1/2/3 to 2/3/4. The new library can therefore make an old callback misclassify every message, and an old callback that indexes a four-entry table by the enum can access past its end when receiving SD_LOG_ERROR. Assign explicit legacy ordinals and append the new level without renumbering them.
AGENTS.md reference: AGENTS.md:L71-L76
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Syncs the fork with upstream master, which is 75 commits ahead of us. The reason to do it now is that upstream merged Qwen-Image-2.1 support (leejet#1994, 2026-09-20), and the prebuilt binaries Studio installs from this repo are from 2026-09-07, so nothing we publish can load a Qwen-Image-2.1 GGUF today.
The merge
Upstream moved the body of
src/stable-diffusion.cppintosrc/pipeline/*, so a plain merge conflicts across two large regions of that file. Resolution: take the upstream copy ofsrc/stable-diffusion.cppwholesale, then re-apply our local guards where the code now lives.Our two source guards:
src/pipeline/image.cpp, so it is dropped here rather than carried as a duplicate.src/pipeline/request.cpp, beside the other guidance normalisation, unchanged in behaviour.Everything else merged cleanly: the 1-D norm sparing in
src/model_loader.cpp, the LTX audio VAE change, and the whole prebuilt CI apparatus including the Windows Authenticode signing.Verification
The merged tree is upstream plus exactly our 13 files, nothing else:
git rev-list --left-right --count upstream/master...HEADreports0 17: nothing of upstream is missing.The same upstream revision (
c678dfe) was already built locally with CUDA sm_100 and used for the whole Qwen-Image-2.1 quantization campaign, so this code is known to load and render that architecture on real hardware: bf16 renders at 1024 in 23.2s, and the GGUF conversions render correctly.After this merges
A prebuilt release has to be cut, otherwise the Studio installer keeps handing out the 2026-09-07 binaries and every Qwen-Image-2.1 GGUF stays unloadable.