Skip to content

feat: add converter metadata to GGUF exports - #2409

Merged
leejet merged 1 commit into
masterfrom
feat/gguf-converter-metadata
Nov 24, 2026
Merged

leejet merged 1 commit into
masterfrom
feat/gguf-converter-metadata

Conversation

@leejet

@leejet leejet commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Record stable-diffusion.cpp and its GitHub repository URL in exported GGUF files as converter.name and converter.url.

Related Issue / Discussion

N/A

Additional Information

N/A

Checklist

Summary by CodeRabbit

  • Improvements
    • GGUF files now include the converter’s name and website address in their metadata, alongside existing metadata. This makes converter information available within exported files while preserving all previously included metadata. The change applies to GGUF exports and does not alter existing metadata fields or remove any previously available information.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The GGUF writer now adds converter.name and converter.url string metadata before adding tensor entries. Existing metadata fields remain unchanged.

Changes: GGUF Metadata

Layer / File(s) Summary
Add converter metadata
src/model_io/gguf_io.cpp
write_metadata adds the converter.name and converter.url string fields before tensor entries.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Suggested reviewers: wbruna

Merge Risk: Minimal · up to 67686

Exported GGUF files will now record the converter name and URL. The change is small, additive, and leaves existing metadata unchanged, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat: add converter metadata to GGUF exports" matches the change. The diff adds converter.name and converter.url string metadata to GGUF exports in GGUFStreamingWriter::write_metadata. The …
Description check Passed The description follows the repository template. It has Summary, Related Issue / Discussion, Additional Information, and Checklist sections. The Summary states the change: stable-diffusion.cpp and its…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat: add converter metadata to GGUF exports" matches the change. The diff adds converter.name and converter.url string metadata to GGUF exports in GGUFStreamingWriter::write_metadata. The title names the main change and is specific enough for a reader scanning history.

Full details: Description check

Explanation

The description follows the repository template. It has Summary, Related Issue / Discussion, Additional Information, and Checklist sections. The Summary states the change: stable-diffusion.cpp and its GitHub URL are recorded as converter.name and converter.url in exported GGUF files. Related Issue and Additional Information are marked N/A, which is acceptable for optional sections. Both checklist items are checked.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c5e2bc7a-6d0d-47db-8ddd-4700cfae7475
Commits

Reviewing files that changed from the base of the PR and between d697a0a and 6768656.

Files selected for processing: 1

  • src/model_io/gguf_io.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@leejet
leejet merged commit 79dc7ca into master Nov 24, 2026
11 checks passed
@leejet
leejet deleted the feat/gguf-converter-metadata branch November 24, 2026 14:27
filve pushed a commit to filve/diffusione-in-tempo-reale that referenced this pull request Nov 24, 2026
…art 3)

Brings in the last five upstream commits:
- LoRA: a mixed-type add the backend rejects falls back to F32 (leejet#2383);
- the hires refine schedule keeps at least one sigma (leejet#2361);
- A1111 sdapi metadata endpoints and /sdapi/v1/interrupt (leejet#2349);
- converter metadata in GGUF exports (leejet#2409);
- a HiDream-O1 example image without noise dots (leejet#2407).

The merge is clean. /sdapi/v1/interrupt used the server's raw context,
which this fork does not have: the running A1111 generation now carries
a CancelToken that the preview state holds while it runs, and the
interrupt stops it through ContextKeeper::cancel(), so only that
generation stops.

test: the server_recovery_test check "with stops arriving, still never
two generations at the same time" failed now and then. On a busy
machine the stop thread cancelled all 160 jobs before any of them
started, so no generation ran and the count stayed at 0, not 1. The
stops now reach one job in five; a new check counts the jobs that run
to their end, and the test still fails when run() loses its lock. The
concurrent load/unload check waits for its readers before the model
changes, for the same reason.

docs: entry 25 of the fork history in docs/integrazione_progetti.md
describes the whole DGL sync and what was tested.

Verified with a CPU build: the library, sd-cli and sd-server build; all
nine unit-test programs pass; server_recovery_test passes eight times
on a machine kept busy (it failed four times in six before the fix),
six times idle and twice under TSan with no warnings; with the
synthetic SD 1.5 model, test/server_cancel_e2e.py passes its 35 checks
and the scratch smoke test of the server passes its 22 checks,
/sdapi/v1/interrupt included; the C example of the guide builds with
-Wall -Wextra and makes its 512x512 image.

Claude-Session: https://claude.ai/code/session_01EhZzDBkuuMp1jBf4WtEySC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant