Repository navigation
Modernise Diffusionfile Support - #970
Merged
Merged
Conversation
jart
reviewed
May 18, 2026
|
|
||
| extern "C" { | ||
| long long llround(double x) { | ||
| return static_cast<long long>(x >= 0.0 ? x + 0.5 : x - 0.5); |
Collaborator
There was a problem hiding this comment.
These should be defined as:
long long llround(double x) {
return round(x);
}
long long llroundf(float x) {
return roundf(x);
}
long long llroundl(long double x) {
return roundl(x);
}I'm adding them to cosmo libc next release.
Contributor
Author
There was a problem hiding this comment.
Thanks for the review, this should be corrected now :)
I built with the changes and it seems to work as expected.
Member
|
Hi @cbk-res ! Many thanks for your contribution 🙏 Given this adds back a feature we had lost, I think it's great even if it does support CPU alone and we can merge it as-is (similarly to what we did with whisperfile) then work to bring GPU support back into it. Code runs well on my system too, from setup to building and testing it |
aittalam
self-requested a review
May 28, 2026 11:11
aittalam
approved these changes
May 28, 2026
Contributor
Author
|
No problem at all @aittalam, glad it is working well. I hope to contribute more in the future :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR attempts to modernise support for stable-diffusion.cpp within llamafile through diffusionfile. I have updated the submodule in use to the latest branch (baf7eda1), removed the now redundant and obsolete patches which were needed by the old version, but seemingly are resolved at present. The new implementation patches SDcpp minimally, following the approach used for whispercpp, and in doing so, removes substantial amounts of code, and therefore maintenance burden. It is working well for me locally as you can see below (although only CPU tested so far), testing with SDXS Q8 gguf, and everything seems to work as expected on my system.
PR Type
Relevant issues
#827
#229
Checklist
llama.cpp/,whisper.cpp/, orstable-diffusion.cpp/, I also updated the matching*.patches/files.AI Usage Information
When answering reviewer questions, please respond yourself rather than pasting reviewer comments into an AI system and posting the reply back unchanged.