Skip to content

Images: an omitted loras reuses the probe status read and survives a failing one (diffusion / g-l red since #17993) - #18000

Merged
danielhanchen merged 1 commit into
mainfrom
ci-images-omitted-loras-status
Nov 16, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-images-omitted-loras-status

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

#17993 (an omitted loras keeps the load's LoRAs) merged with three backend tests red, and they are red on main now ((Python 3.13, diffusion) and (Python 3.13, g-l) on every PR based on 01d166c63c or later):

test_diffusion_minimax_h3_image_default_size.py::test_an_omitted_text_to_image_size_survives_a_failing_status_read
    RuntimeError: status read failed
test_image_generate_model_defaults.py::test_explicit_values_equal_to_the_schema_defaults_stay_and_skip_the_status_read
    assert 2 == 1   (backend.status_calls)
test_diffusion_lora.py::test_lora_loader_check_exceptions_hold
    ModuleNotFoundError: No module named 'diffusers'

Cause and fix

A failing status read now fails the run (route). The new request.loras is None block in _generate_diffusion_image_run calls backend.status() unguarded. The omitted-size path right below it already treats a failed status read as "no status", and the test pins that a run with named steps and guidance survives one. A status read that raises now fails /images/generate before the engine is called. The fix gives the omitted-loras block the same handling as the size block:

An extra status read on every run with explicit steps and guidance (test). The defaults test sends steps and guidance and asserts the defaults add no status read. Since #17993 an omitted loras stands for the load's adapters, which needs the status, so that request is no longer fully explicit. The test now also names loras: [], which keeps its claim (explicit values skip the read and do not pin the load). With the probe reuse above, an omitted loras costs no extra read either, and a new test pins that: one status read in total, and the run is pinned to the load.

The MOSS import runs before the diffusers skip (test). test_lora_loader_check_exceptions_hold imports core.inference.diffusion_moss_image before pytest.importorskip("diffusers"), but that module subclasses diffusers' mixins at import time, so the diffusion shard (no diffusers installed) errors instead of skipping. The import now comes after the skip. The family-name check still runs everywhere.

Verification

  • On main: the first two fail, as in CI. The third needs diffusers absent; with sys.modules["diffusers"] = None it skips with this change instead of erroring.
  • With this change: test_image_generate_model_defaults.py, test_diffusion_minimax_h3_image_default_size.py, test_diffusion_lora.py and test_images_generate_load_loras.py: 725 passed. The 32 backend test files that drive /images/generate or the LoRA defaults: 2070 passed; the 5 failures there (test_diffusion_backend.py MiniMax H3 download plan) fail the same way on main in this environment (a local diffusers import error), so they are not from this change.
  • Restoring main's routes/inference.py fails the size test (status read failed) and the new omitted-loras test (two status reads).

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T18:41:45.318001Z 6d80df1 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 6d80df19fa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@danielhanchen
danielhanchen merged commit 6a92027 into main Nov 16, 2026
@danielhanchen
danielhanchen deleted the ci-images-omitted-loras-status branch November 16, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant