feat:support DiT and VAE for flux2#1983
Open
wang-shuibin wants to merge 2 commits into
Open
Conversation
wang-shuibin
requested review from
Clement-Wang26,
DongheJin,
DragonFive,
JimHsiung,
Kang-Meng,
RobbieLeung,
XuZhang99,
liujinguang0125,
liutongxuan,
walsonyang,
xiao-yu-chen,
yingxudeng,
yq33victor and
zhang-minchao
as code owners
July 20, 2026 12:43
|
|
||
| PROPERTY(float, batch_norm_eps) = 1e-04f; | ||
| PROPERTY(float, batch_norm_momentum) = 0.1f; | ||
| PROPERTY(std::vector<int64_t>, ae_patch_size) = {}; |
| class AdaLayerNormContinuousImpl : public torch::nn::Module { | ||
| public: | ||
| explicit AdaLayerNormContinuousImpl(ModelContext context) | ||
| explicit AdaLayerNormContinuousImpl(ModelContext context, |
Collaborator
There was a problem hiding this comment.
is this change necessary?
Author
| // ── Determine parallelism strategy for QKV ── | ||
| std::optional<TpOptions> tp_options = std::nullopt; | ||
|
|
||
| if (FLAGS_tp_size > 1) { |
Collaborator
There was a problem hiding this comment.
use config instead of glags
Author
There was a problem hiding this comment.
Revised, now using config instead of flags.
| }; | ||
| TORCH_MODULE(Flux2PosEmbed); | ||
|
|
||
| class Flux2PipelineBaseImpl : public torch::nn::Module { |
Collaborator
There was a problem hiding this comment.
when support klein, need think about encapsulating features in base classe.
wang-shuibin
force-pushed
the
flux2_dit_vae_0720
branch
from
July 21, 2026 09:27
14e9225 to
2eeb65f
Compare
xiao-yu-chen
previously approved these changes
Jul 22, 2026
wang-shuibin
force-pushed
the
flux2_dit_vae_0720
branch
from
July 22, 2026 04:55
2eeb65f to
2f0c535
Compare
XuZhang99
reviewed
Jul 22, 2026
| @@ -0,0 +1,213 @@ | |||
| /* Copyright 2025 The xLLM Authors. All Rights Reserved. | |||
Co-authored-by: ethan686 <zbw_ethan@163.com>
wang-shuibin
force-pushed
the
flux2_dit_vae_0720
branch
from
July 22, 2026 13:08
da899b7 to
5afe5ba
Compare
xiao-yu-chen
approved these changes
Jul 22, 2026
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.
Description
support DiT and VAE module for flux2
Related Issues
Feat:support DiT and VAE module for flux2
Change Type
Pull Request Checklist
Thank you for contributing to xLLM. Before requesting review, please make sure the following items are complete.
PR Title and Commit Messages
<type>: <subject>.Pre-commit Checks
pre-commitby runningpip install pre-commitor an equivalent command.pre-commit install.pre-commit run --all-filesand fixed any reported issues.Self Review
.agents/skills/code-review/references/custom-code-style.md, especially code written or assisted by AI.mainbranch.Build and Test Coverage
python setup.py build testhas passed on a CUDA machine.python setup.py build testhas passed on an NPU machine.python setup.py build testhas passed on an MLU machine.Reviewer Notes