-
Notifications
You must be signed in to change notification settings - Fork 88
feat(diffusers/pipelines): add pipelines and required modules of QwenImage in Diffusers Master #1288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Dong1017
wants to merge
83
commits into
mindspore-lab:master
Choose a base branch
from
Dong1017:qwenimage
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(diffusers/pipelines): add pipelines and required modules of QwenImage in Diffusers Master #1288
Changes from 58 commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
d3dec44
2025/08/15
Dong1017 6006960
2025/8/15 17:18 revised
Dong1017 15bc8ae
2025/8/18 10:22 revised
Dong1017 103db50
2025/8/18 17:00 revised
Dong1017 77779b5
2025/8/18 19:08 revised
Dong1017 0cab22b
2025/8/18 19:13 revised
Dong1017 2b7b4c9
2025/8/19 9:02 revised
Dong1017 d7eaa37
2025/8/19 9:04 revised
Dong1017 dddd8f2
2025/8/19 9:12 revised
Dong1017 3117bdc
2025/8/19 10:27 revised
Dong1017 e19c2e3
2025/8/20 9:22 revised
Dong1017 0fb127a
2025/8/20 9:247 revised
Dong1017 5d317bc
2025/8/20 9:48 revised
Dong1017 e8043d8
2025/8/20 9:52 revised
Dong1017 b78ef0a
2025/8/20 10:15 revised
Dong1017 656acce
2025/8/20 10:50 revised
Dong1017 9a33d83
2025/8/20 11:11 revised
Dong1017 c2f972c
2025/8/20 11:27 revised
Dong1017 9e2cccf
2025/8/20 11:47 revised
Dong1017 9b5be21
2025/8/20 14:25 revised
Dong1017 1906919
2025/8/20 14:26 revised
Dong1017 c3055ba
2025/8/21 15:20 revised
Dong1017 e025800
2025/8/21 15:24 revised
Dong1017 436ebf3
2025/8/21 17:08 revised
Dong1017 dafec1a
2025/8/21 17:57 revised
Dong1017 e573be1
2025/8/21 19:13 revised
Dong1017 d549ab2
2025/8/22 11:32 revised
Dong1017 09ac0bd
2025/8/22 17:40 revised
Dong1017 fb5877b
2025/8/25 10:40 revised
Dong1017 358b20b
2025/8/26 10:30 revised
Dong1017 721543e
2025/8/26 17:10 revised
Dong1017 fc02927
2025/8/26 17:20 revised
Dong1017 3b16c50
2025/8/27 14:08 revised
Dong1017 151ed25
2025/8/27 17:05 revised
Dong1017 46cd675
2025/8/27 17:09 revised
Dong1017 35b35fc
2025/8/27 17:23 revised
Dong1017 19c938e
2025/8/29 15:42 revised
Dong1017 44504e5
2025/9/1 09:18 revised
Dong1017 d5cfad2
2025/9/1 09:40 revised
Dong1017 aa08b1a
2025/9/2 14:06, img2img infer
Dong1017 92d1a23
2025/9/3 8:50, inpaint infer
Dong1017 c1998e4
2025/9/3 14:07, img2img test
Dong1017 ae1f7b2
2025/9/3 14:18, img2img test
Dong1017 be1b18b
2025/9/3 16:30, inpaint test
Dong1017 d6cf7e1
2025/9/4 14:21, edit bugs
Dong1017 dfc5e23
2025/9/4 15:58, edit ut
Dong1017 39168ee
2025/9/5 15:07, edit-inpaint pipe
Dong1017 fdfb3a3
2025/9/5 17:40, fix some bugs
Dong1017 97b3d8e
modified qwenimage 2025/9/15
Dong1017 440e226
2025/9/15 seamless_m4t submit
Dong1017 2e060cb
2025/9/17 seamless_m4t ut
Dong1017 a2a52b2
25/9/17 seamless_m4t clean
Dong1017 74c91f3
2025/9/17 qwenimage clean
Dong1017 9ec46f4
fix: remove unwanted files
Dong1017 69c6f6a
fix: remove unwanted files
Dong1017 ec98ccb
fix: keep file consistent
Dong1017 c2c61d3
fix: keep file consistent
Dong1017 ff03c7a
fix: keep file consistent
Dong1017 8faa7b3
revised according to gemini
Dong1017 f77b668
revised according to gemini
Dong1017 ab08ce5
fix conflicting according to gemini
Dong1017 a19fbe5
fix conflicting according to gemini
Dong1017 ab566b3
Merge branch 'master' into qwenimage
Dong1017 9ce5c35
required lines but conflicting
Dong1017 854ac0c
Merge branch 'qwenimage' of github.com:Dong1017/mindone into qwenimage
Dong1017 f770d50
required lines but conflicting
Dong1017 7d5da80
fix: md, according to Cui-yshoho
Dong1017 c70d315
fix a bug of qwen2_5_vl, some revisions suggested from Cui-yshoho and…
Dong1017 735e6af
Resolved the conflict regarding qwen2_5_vl masked_scatter-bf16-bug
Dong1017 237183e
Add UTs of transformer, supplement MDs, delete unused code comments
Dong1017 a498371
update md to notice the use of transformers==4.52.1
Dong1017 e73acef
fix ci problem
Dong1017 07b10a7
Merge branch 'master' into qwenimage
Dong1017 dbb8ac2
fix ci problem
Dong1017 d88f7e4
Merge branch 'qwenimage' of https://github.com/Dong1017/mindone into …
Dong1017 427961a
fix ci problem
Dong1017 54af7f1
fix ci problem
Dong1017 4eb6673
Merge branch 'master' into qwenimage
Dong1017 0524331
CHECK: pre-commit run --all-files
Dong1017 3102629
fix ci problem - strange format?
Dong1017 faca606
Trigger CI
Dong1017 c2508b9
fix ci problem - modeling_reformer
Dong1017 ad179cd
Merge branch 'master' into qwenimage
Dong1017 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!-- Copyright 2025 The HuggingFace Team. All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. --> | ||
|
||
# AutoencoderKLQwenImage | ||
|
||
The model can be loaded with the following code snippet. | ||
|
||
```python | ||
from mindone.diffusers import AutoencoderKLQwenImage | ||
|
||
vae = AutoencoderKLQwenImage.from_pretrained("Qwen/QwenImage-20B", subfolder="vae") | ||
``` | ||
|
||
::: mindspore.diffusers.AutoencoderKLQwenImage | ||
Dong1017 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
::: mindspore.diffusers.models.autoencoders.autoencoder_kl.AutoencoderKLOutput | ||
|
||
::: mindspore.diffusers.models.autoencoders.vae.DecoderOutput |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Copyright 2025 The HuggingFace Team. All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. --> | ||
|
||
# QwenImageTransformer2DModel | ||
|
||
The model can be loaded with the following code snippet. | ||
|
||
```python | ||
from mindone.diffusers import QwenImageTransformer2DModel | ||
|
||
transformer = QwenImageTransformer2DModel.from_pretrained("Qwen/QwenImage-20B", subfolder="transformer", mindspore_dtype=mindspore.bfloat16) | ||
Dong1017 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
``` | ||
|
||
::: mindspore.diffusers.QwenImageTransformer2DModel | ||
|
||
::: mindspore.diffusers.models.modeling_outputs.Transformer2DModelOutput |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!-- Copyright 2025 The HuggingFace Team. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. --> | ||
|
||
# QwenImage | ||
|
||
<div class="flex flex-wrap space-x-1"> | ||
<img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/> | ||
</div> | ||
|
||
Qwen-Image from the Qwen team is an image generation foundation model in the Qwen series that achieves significant advances in complex text rendering and precise image editing. Experiments show strong general capabilities in both image generation and editing, with exceptional performance in text rendering, especially for Chinese. | ||
|
||
Qwen-Image comes in the following variants: | ||
|
||
| model type | model id | | ||
|:----------:|:--------:| | ||
| Qwen-Image | [`Qwen/Qwen-Image`](https://huggingface.co/Qwen/Qwen-Image) | | ||
| Qwen-Image-Edit | [`Qwen/Qwen-Image-Edit`](https://huggingface.co/Qwen/Qwen-Image-Edit) | | ||
|
||
!!! Tip | ||
Dong1017 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
[Caching](../../optimization/cache) may also speed up inference by storing and reusing intermediate outputs. | ||
|
||
!!! Tip | ||
|
||
::: mindone.diffusers.QwenImagePipeline | ||
|
||
::: mindone.diffusers.pipelines.qwenimage.pipeline_output.QwenImagePipelineOutput | ||
|
||
::: mindone.diffusers.QwenImageImg2ImgPipeline | ||
|
||
::: mindone.diffusers.QwenImageInpaintPipeline |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.