Repository navigation
refactor: use one placeholder token per image in LLM inputs - #2191
Merged
Merged
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 5
✨ Finishing Touches
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. Comment |
GabrieleLozupone
added a commit
to GabrieleLozupone/stable-diffusion.cpp
that referenced
this pull request
Oct 22, 2026
Takes upstream up to fd21ecf, including the Vulkan fix for small BAR heaps (leejet#2181, ggml c1f80e5). ggml now points at GabrieleLozupone/ggml kokon-c1f80e5: upstream c1f80e5 plus the CUDA graphs commit. Conflicts and follow-ups: - server: /sdcpp/v1/text_gen registers through RuntimeRoutes like the other routes. The streaming reply generates after the handler returns, so it holds the model runtime lock itself while it runs (a model switch gets 409 instead of unloading the context under it). - capabilities: upstream's limits plus max_text_tokens / max_text_images. - name conversion: upstream's language_model prefix rename plus the llama.cpp "output" -> lm_head mapping. - text generation: leejet#2191 puts one <|image_pad|> per image in LLM inputs and expands it in splice_image_embeds(). generate_text() now does the same, with image indices in the expanded sequence, and the KV cache counts the expanded tokens.
6 tasks
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.
Summary
Related Issue / Discussion
N/A
Additional Information
N/A
Checklist