Repository navigation
Diffusion tests: assert the typed LoRA reload refusal, skip encoder streaming without diffusers - #18535
Merged
Conversation
…treaming without diffusers
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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
(Python 3.13, diffusion)fails onmainfor every PR (seen on #18526 and #18348, neither of which touches diffusion). Four tests, from two recent merges:Root causes
LoRA reload refusal (#18420). #18420 turned this refusal into
LoraReloadRequiredErrorand rewrote its message to name the remedy (Reapply on the Images page, orlorasin/images/load). The routes key on the type (X-Unsloth-Refusal: lora-reload,error.code = "lora_reload_required"). The two tests still matched the old wording. The behaviour is intended; the tests pinned prose.Encoder residency streaming (#18424).
EncoderResidency.release()streams the text encoders through diffusers' group offloading. The(Python 3.13, diffusion)lane does not install diffusers (the same log showsNo module named 'diffusers'skips), so the stream fails,release()correctly keeps the encoders resident and returns 0, and the two tests that need a real stream fail. The module is right to refuse; the tests needed diffusers and did not say so.Changes
test_diffusion_backend.py: both tests assertpytest.raises(LoraReloadRequiredError, match = "Reload the model with the LoRA selection"), the typed refusal plus the remedy phrase both messages share.test_diffusion_te_residency.py: the two streaming tests are marked to skip whenimportlib.util.find_spec("diffusers") is None. Only the absence of diffusers skips: with diffusers installed, a regression in Unsloth's streaming still fails them. The tests that do not stream (host RAM refusal, a failed stream putting the encoders back) keep running everywhere.Test-only change.
Testing
pytest tests/test_diffusion_te_residency.py tests/test_diffusion_backend.py: 733 passed, the two streaming tests included.LoraSelectionErrorinstead ofLoraReloadRequiredErrorfails both LoRA tests.(Python 3.13, diffusion)job on this PR.