Add mobius to capture onnx graph cli#2471
Open
xiaoyu-work wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for using the MobiusBuilder pass from the capture-onnx-graph CLI path, enabling capturing ONNX graphs via mobius-ai (including support for multi-component multimodal models), and adds CLI test coverage for the new behavior.
Changes:
- Added
--use_mobius_builderflag toolive capture-onnx-graph. - Updated capture workflow config generation to route through a new
MobiusBuilderpass (b) and validate supported precisions/conflicting flags. - Added CLI unit tests covering MobiusBuilder selection, runtime setting, and invalid flag combinations.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
olive/cli/capture_onnx.py |
Adds --use_mobius_builder and wires a new MobiusBuilder pass into the generated workflow config. |
test/cli/test_cli.py |
Adds CLI tests to validate MobiusBuilder config selection and input validation errors. |
justinchuby
reviewed
May 22, 2026
| @@ -197,8 +207,14 @@ def _get_run_config(self, tempdir: str) -> dict: | |||
| is_diffusers_model = input_model_config["type"].lower() == "diffusersmodel" | |||
|
|
|||
| # whether model is in fp16 or bf16 (currently not supported by CPU EP) | |||
Contributor
There was a problem hiding this comment.
cpu supports f16 right?
Collaborator
Author
There was a problem hiding this comment.
not all of the cpus support fp16, maybe we need to revisit this later
justinchuby
previously approved these changes
May 22, 2026
…nnx-graph When --use_mobius_builder is set, skip is_valid_diffusers_model() and always build an HfModel input config, so mobius handles diffusion pipelines too instead of being silently overridden by the diffusers branch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Describe your changes
Add
--use_mobius_builderflag to thecapture-onnx-graphCLI command to support MobiusBuilder (mobius-ai) for capturing ONNX models, with multi-component multimodal model (VLM) support.The three mutually exclusive exporter flags (
--use_dynamo_exporter,--use_model_builder,--use_mobius_builder) are now enforced as mutually exclusive at the argparse layer viaadd_mutually_exclusive_group, providing immediate and consistent CLI feedback instead of a deferred runtime error.Checklist before requesting a review
lintrunner -a(Optional) Issue link