-
Notifications
You must be signed in to change notification settings - Fork 574
update stable-diffusion.cpp to master-306-2abe945 #1732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update stable-diffusion.cpp to master-306-2abe945 #1732
Conversation
|
i'll be away for about a week, will try to look at this after. once you've synced and tested you can unmark as draft first. |
|
Hmm seems like your previous PR conflicts with this? |
|
Yeah, I didn't touch the stb headers with this one, so we'll have at least a small conflict on main. I'll fix that one shortly. Looks like leejet/stable-diffusion.cpp#484 is about to be included upstream, too! I should at least grab the current PR branch. Edit: all four fixes got merged 🎉 I'll probably just reconstruct the branches. |
1e596c5 to
c99ac4d
Compare
be2b101 to
bf8fc46
Compare
c99ac4d to
9c61e8d
Compare
|
Removed local changes due to merged upstream PRs:
Also removed:
And included:
|
9c61e8d to
1fdea05
Compare
|
master-0ebe6fe changed the Photomaker interface to receive a list of images instead of an image directory, which was exactly what our |
| if (conditioner_wtype != GGML_TYPE_F32) { | ||
| LOG_INFO("CLIP: Forcing CPU backend for T5"); | ||
| clip_on_cpu = true; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure about this. For instance, t5xxl_q8_0.gguf makes black images on ROCm, but works fine on Vulkan. Forcing it to CPU in this case adds around 45s to generation time... OTOH, a Q4_K quant crashes on both.
|
i'm back from my trip, so I'll take a look at this over the next few days. kobold is overdue for a release though, so it'll probably have to wait for the next one. |
|
Welcome back! Yeah, the changes are extensive, and there is at least one still unsolved problematic upstream issue (844). But take a look at the three commits before the sd updates, they may be simple enough to include right now (I can put them in a separate PR if that helps). |
Yes please, that would be good |
a48487c to
0bdc8e9
Compare
|
Image generation is kinda broken with the ggml version on the 1.99 release 😕 I'll open an upstream issue shortly. |
|
Thanks, I will temporarily reverse ggml-org#16056 for a stable patch while this is investigated upstream. Btw your other PR #1746 caused a merge conflict |
0bdc8e9 to
0eaf498
Compare
|
@wbruna can you see if 1.99.1 has the prompt adherence work fine? I reverted the commit you listed. |
|
@LostRuins , 1.99.1 seems to be working fine 👍 0cc4m's PR (16151) seems to work, too |
|
merged 16151 for 1.99.2 |
|
Will this be updated to support the new qwen model once that PR lands? Thats the main thing our users are waiting for |
0eaf498 to
ff08284
Compare
Since there are a lot of changes, I'd be more comfortable if we gave the update a bit of testing before including changes for specific support. Of course, if Qwen-Image doesn't need any other special parameters or treatment, it may be just a matter of merging in the new revisions. |
ff08284 to
8374423
Compare
|
@LostRuins , I moved the Things that we'll need to consider at some point or another:
Marking the PR as 'ready' since I've been testing it for several days. |
8374423 to
0eb04d9
Compare
|
Updated to master-306-2abe945 , which includes the fixes for leejet/stable-diffusion.cpp#838 and leejet/stable-diffusion.cpp#837 . Just a minor API change, and I don't think there is any major bug left, so it should be ready to go. Oh, and I forgot about another nice load-time config parameter: |
|
cool, is this ready for review? still kinda busy but i'm hoping to get qwen image and wan into the next release. |
|
It's ready for review. I still need to do a full round of testing, to catch anything I've missed, but all the code should be already in place. As I mentioned before, the diff here is hard to follow, especially for the first updates. But the branches
The |
|
Tested: SD1.5, SDXL, LoRAs, SD3.5M, img2img, inpaint, Chroma, Flux Schnell, Photomaker, Kontext, TAESD (fixed a bug). |
|
Remind me again - have we always been running the T5 on CPU previously? And what backend issues are there with using it on GPU |
|
Alright did some basic testing and everything seems fine mostly. Will merge shortly |
|
Merged. I'll download and check out WAN sometime, but for now please report any issues found |

This updates the embedded sd.cpp code to
master-c648001, plus a few sd.cpp pending fixesmaster-52a97b3master-0ebe6femaster-301-fd693acmaster-306-2abe945 .For anyone wondering, it does not bring in any new functionality; I'll be happy if everything is still working as before 🙂 The diff is massive, and at several points I had to basically rewrite the needed changes.
I did the sync through the following branches:
The included pending PRs areThe pendings PRs below got merged upstream:For
sdtype_adapter.cpp, instead of mirroring each new supported parameter, I decided to clean everything up, keeping only the parameters that can be changed through the Koboldcpp API. The others are either fixed on the code (likebatch_count) or left at their defaults set by sd.cpp. Most changes are unrelated to the sd.cpp update, so I could submit them separately if you wish.For the other changes, it may be easier to compare the previous diff chunks (added in 6cf0a96df1a8 ) against the new one between the branches above.
The PR is ready in the I'm-not-aware-of-anything-missing sense, but I've only tested it lightly, so I'll leave it as draft for now. I'll be reviewing and testing it for a few days. Feel free to bug me with anything you notice.