Repository navigation
[diffusion] model: support LongCat-Image - #23274
Merged
BBuf merged 2 commits intoAug 13, 2026
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Dragonliu2018
force-pushed
the
lzl/feat/support_longcat_image
branch
9 times, most recently
from
April 29, 2026 05:01
ee7ed31 to
a88ce4e
Compare
Dragonliu2018
force-pushed
the
lzl/feat/support_longcat_image
branch
3 times, most recently
from
April 29, 2026 16:21
b6adc4f to
a0e6f74
Compare
Dragonliu2018
marked this pull request as ready for review
April 29, 2026 16:42
Dragonliu2018
requested review from
BBuf,
mickqian,
ping1jing2,
yhyang201 and
yingluosanqian
as code owners
April 29, 2026 16:42
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Contributor
Author
|
Please review this PR. Thanks! |
Dragonliu2018
force-pushed
the
lzl/feat/support_longcat_image
branch
2 times, most recently
from
May 20, 2026 16:19
adc6ed1 to
ee51d28
Compare
Contributor
Author
|
/tag-and-rerun-ci |
mickqian
reviewed
Jun 1, 2026
Dragonliu2018
force-pushed
the
lzl/feat/support_longcat_image
branch
from
July 14, 2026 15:19
ee51d28 to
35a350d
Compare
Dragonliu2018
requested review from
AgainstEntropy,
HaiShaw and
yichiche
as code owners
July 14, 2026 15:19
Dragonliu2018
force-pushed
the
lzl/feat/support_longcat_image
branch
3 times, most recently
from
July 15, 2026 13:39
e291b38 to
f47d906
Compare
Contributor
Author
Hi @mickqian, addressed the comments above. |
Dragonliu2018
force-pushed
the
lzl/feat/support_longcat_image
branch
from
August 9, 2026 15:35
f47d906 to
9e07394
Compare
BBuf
approved these changes
Aug 12, 2026
Collaborator
|
/tag-and-rerun-ci |
saturn-acc
pushed a commit
to saturn-acc/sglang
that referenced
this pull request
Aug 16, 2026
Co-authored-by: Xiaoyu Zhang <[email protected]>
Atituiset
pushed a commit
to Atituiset/sglang
that referenced
this pull request
Sep 10, 2026
Co-authored-by: Xiaoyu Zhang <[email protected]>
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.
Motivation
This PR adds support for LongCat-Image, a new text-to-image model based on a Flux-like MMDiT architecture with a Qwen2.5-VL (7B) text encoder.
Modifications
New components:
LongCatImageTransformer2DModel: Flux-like MMDiT, 19 double + 38 single-stream blocks, 24×128 dim, 2×2 latent packing, RoPE (axes=[16,56,56]), AdaLN-Zero. USPAttention (FA3/FA4) + fused qk-norm; weights load without remapping.LongCatPromptRewriteStage(model-specific): optional prompt rewrite via Qwen2.5-VL.generate()(max_new_tokens=512, top_k=1 → effectively greedy; sampling params from checkpoint's generation_config.json). Loads the HF encoder in-stage and shares it with TextEncodingStage; sets CPU generator for seed reproducibility.LongCatImagePipeline: PromptRewriteStage → TextEncoding → LatentPrep → TimestepPrep → Denoising → Decoding (only the first is model-specific).LongCatImagePipelineConfighooks: quotation-aware tokenization with fixed system prefix/assistant suffix (512-token body), 2×2 pack/unpack, 3D modality-aware pos ids (txt=0 / img=1 @ offset 512), seq-len-dependent flow-match shift, CFG renorm (cond_norm/noise_norm clamped to [min, 1.0]).Shared changes:
SamplingParams: add enable_cfg_renorm / cfg_renorm_min / enable_prompt_rewrite (+ CLI).AutoProcessorLoader: add "text_processor" to component_names.registry: register LongCat-Image ("longcat" detector, excludes "edit").Examples
Accuracy Tests
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ✅ Run #31676886716
Latest PR Test (Extra): ✅ Run #31676886686