perf: keep chunk-K residency engaged with runtime LoRA#1598
Merged
Conversation
1 task
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
Re-enable chunk-K residency for the runtime LoRA path. Two related fixes in
compute_streaming_segments/resolve_graph_cut_plan:weight_adapter != nullptrbypass. Runtime LoRA composesweight + diffin the compute graph viaggml_add; the resident weight is never mutated, so the cached GPU copy stays valid across sampling steps.free_vrambefore clamping the streaming budget. Otherwise chunk-K's own allocation is read as "taken by someone else", the budget shrinks step-to-step, and the resident set rebuilds every step instead of every generation.Related Issue / Discussion
Follow-up to #1576 (
--stream-layers). Closes the LoRA-path perf gap left there.Additional Information
Z-Image bf16, 512x512, 8 steps,
--offload-to-cpu --stream-layers --max-vram 8on RTX 3060:LoRA multiplier scaling unchanged (0.8 vs 1.5 mean pixel diff 26.17 -> 26.05).
Checklist