Skip to content

[BugFix] Fix MammothModa2 Text-to-Image Bug - #4299

Merged
wtomin merged 5 commits into
vllm-project:mainfrom
menjiantong:fix_mammothmodal2
Jun 25, 2026
Merged

wtomin merged 5 commits into
vllm-project:mainfrom
menjiantong:fix_mammothmodal2

Conversation

@menjiantong

Copy link
Copy Markdown
Contributor

Before submitting: run the precheck-pr skill with code agent for a self-check against project conventions — catches dead code, missing benchmarks, and title format issues.

PLEASE FILL IN THE PR DESCRIPTION HERE ENSURING ALL CHECKLIST ITEMS (AT THE BOTTOM) HAVE BEEN CONSIDERED.

Purpose

fix #4298

Test Plan

1*A800 80G

python examples/offline_inference/mammothmodal2_preview/run_mammothmoda2_t2i.py \
  --model bytedance-research/MammothModa2-Preview \
  --stage-config ./vllm_omni/model_executor/stage_configs/mammoth_moda2.yaml \
  --prompt "A stylish woman riding a motorcycle in NYC, movie poster style" \
  --height 1024 \
  --width 1024 \
  --num-inference-steps 50 \
  --text-guidance-scale 4.0 \
  --out output.png 

Test Result

719b3ee11430ebe4c03167137776721a
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)

menjiantong added 3 commits June 10, 2026 00:46
Signed-off-by: menjiantong <menjiantong@foxmail.com>
Signed-off-by: menjiantong <menjiantong@foxmail.com>
Signed-off-by: menjiantong <menjiantong@foxmail.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

self.tokenizer_class = "MammothUTokenizer"
self.architectures = ["Mammothmoda2Model"]

super().__init__(**kwargs)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Consider adding a regression test that verifies get_text_config() returns the correct nested text_config. This would prevent similar AttributeError issues in the future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback! I'll add a regression test.

def ar2dit(
source_outputs: list[Any],
prompts: OmniTokensPrompt | TextPrompt | None = None,
prompts: OmniTokensPrompt | TextPrompt | list | None = None,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The type annotation list | None is broad. Consider using list[OmniTokensPrompt | TextPrompt] | None for better type safety, or adding a runtime isinstance check to validate the list contents.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll fix this and push an update shortly.

@menjiantong
menjiantong requested a review from yenuo26 as a code owner June 10, 2026 16:05
menjiantong
fix
Signed-off-by: menjiantong <menjiantong@foxmail.com>
@menjiantong

Copy link
Copy Markdown
Contributor Author

@hsliuustc0106 I've addressed your comments and ut are passing. ptal, thanks.
image

@Gaohan123 Gaohan123 added this to the v0.24.0 milestone Jun 18, 2026
@Gaohan123

Copy link
Copy Markdown
Collaborator

@wtomin @SamitHuang PTAL

@wtomin wtomin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this fix looks good to me.

@wtomin wtomin added the ready label to trigger buildkite CI label Jun 24, 2026
@wtomin

wtomin commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

@yenuo26 I think this error message "ERROR tests/diffusion/models/glm_image/test_glm_image_sp.py - Failed: 'sp' not found in markers configuration option" is not relevant to this PR. Please check it.

@wtomin wtomin added ready label to trigger buildkite CI and removed ready label to trigger buildkite CI labels Jun 25, 2026
@wtomin
wtomin merged commit 0fd2620 into vllm-project:main Jun 25, 2026
9 checks passed
khairulkabir1661 pushed a commit to khairulkabir1661/vllm-omni that referenced this pull request Sep 25, 2026
Signed-off-by: menjiantong <menjiantong@foxmail.com>
Co-authored-by: menjiantong <menjiantong@foxmail.com>
Co-authored-by: Didan Deng <33117903+wtomin@users.noreply.github.com>
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.

[Bug]: MammothModa2 Text-to-Image Generation Failed

4 participants