Skip to content

[Bugfix] NextStep cannot launch with offline example text_to_image.py#1947

Closed
fhfuih wants to merge 1 commit into
vllm-project:mainfrom
fhfuih:fix-nextstep-offline-example
Closed

[Bugfix] NextStep cannot launch with offline example text_to_image.py#1947
fhfuih wants to merge 1 commit into
vllm-project:mainfrom
fhfuih:fix-nextstep-offline-example

Conversation

@fhfuih
Copy link
Copy Markdown
Contributor

@fhfuih fhfuih commented Mar 17, 2026

Purpose

The offline example text_to_image.py script specially caters to NextStep model by setting

omni_kwargs["model_class_name"] = "NextStep11Pipeline"
# ...
omni = Omni(**omni_kwargs)

But in this case, it skips the real setup in OmniDiffusion.

def __init__ # ...
    # ...
    elif model_type == "nextstep":
        if od_config.model_class_name is None:  # Not None any more!
            pipeline_class = "NextStep11Pipeline"  # This is not Set!

Thus, it results in the following error

Traceback (most recent call last):
  File "/usr/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.12/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.12/dist-packages/vllm_omni/entrypoints/omni_stage.py", line 889, in _stage_worker
    stage_engine = OmniDiffusion(
                   ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/vllm_omni/entrypoints/omni_diffusion.py", line 97, in __init__
    raise ValueError(f"Unknown model type: {model_type}, architectures: {architectures}")
ValueError: Unknown model type: nextstep, architectures: ['LlamaForCausalLM']

Note that this error is only about the offline inference mode (not AsyncOmniDuffusion).

Test Plan

Run the NextStep example snippet in the doc after this patch

Instead of showing the error above, it should run fine.

Test Result

Pass on my side. There is no CI test for NextStep for now.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan. Please provide the test scripts & test commands. Please state the reasons if your codes don't require additional test scripts. For test file guidelines, please check the test style doc
  • The test results. Please paste the results comparison before and after, or the e2e results.
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model. Please run mkdocs serve to sync the documentation editions to ./docs.
  • (Optional) Release notes update. If your change is user-facing, please update the release notes draft.

BEFORE SUBMITTING, PLEASE READ https://github.com/vllm-project/vllm-omni/blob/main/CONTRIBUTING.md (anything written below this line will be removed by GitHub Actions)

@fhfuih fhfuih requested a review from hsliuustc0106 as a code owner March 17, 2026 06:54
Copilot AI review requested due to automatic review settings March 17, 2026 06:54
Signed-off-by: Huang, Zeyu <11222265+fhfuih@users.noreply.github.com>
@fhfuih fhfuih force-pushed the fix-nextstep-offline-example branch from cd75c6f to 7c7ec07 Compare March 17, 2026 06:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes offline NextStep example startup by ensuring OmniDiffusion selects the NextStep pipeline class even when model_class_name is pre-set by the offline script.

Changes:

  • Use od_config.model_class_name as the pipeline_class for model_type == "nextstep" when provided.
  • Preserve the existing default behavior (NextStep11Pipeline) when model_class_name is not provided.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Copy Markdown
Collaborator

@wtomin wtomin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@hsliuustc0106 hsliuustc0106 added the ready label to trigger buildkite CI label Mar 19, 2026
@fhfuih
Copy link
Copy Markdown
Contributor Author

fhfuih commented Mar 19, 2026

Close as this file is deleted after #1908 . The offline entrypoint also uses async engine, which does not have this error any more

@fhfuih fhfuih closed this Mar 19, 2026
@fhfuih fhfuih deleted the fix-nextstep-offline-example branch April 28, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants