Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Qwen Image Edit Support #12164

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

Merged
yiyixuxu merged 3 commits into huggingface:main from naykun:main
Aug 17, 2025
Merged

Qwen Image Edit Support #12164

yiyixuxu merged 3 commits into huggingface:main from naykun:main
Aug 17, 2025

Conversation

Copy link
Contributor

@naykun naykun commented Aug 16, 2025

This pull request introduces support for Qwen Image Edit.

For additional information, please visit the Qwen-Image repository .
If you find our work beneficial, we kindly encourage you to star the repository, which will help accelerate the release of the checkpoint.

cc @yiyixuxu @a-r-r-o-w

a-r-r-o-w, tolgacangoz, yiyixuxu, 651961, sayakpaul, and linoytsaban reacted with heart emoji
add qwen-image-edit support
Copy link
Member

@a-r-r-o-w a-r-r-o-w left a comment

Choose a reason for hiding this comment

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

Thanks @naykun!


# 是否使用 scale rope
# DO NOT USING REGISTER BUFFER HERE, IT WILL CAUSE COMPLEX NUMBERS LOSE ITS IMAGINARY PART
Copy link
Member

@a-r-r-o-w a-r-r-o-w Aug 16, 2025

Choose a reason for hiding this comment

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

cc @sayakpaul for review of rope changes

@naykun We refactored the RoPE logic in #12061 to make it compatible with torch.compile. Would you be able to add the relevant changes for QwenEdit with the current implementation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the latest commit, I have refactored the code as described in #12061.
Please kindly review and let me know if it looks good. Local testing confirms that it correctly generates images.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

aweesome! thank you!

- compatible with torch.compile in new rope setting
- fix init import
- add prompt truncation in img2img and inpaint pipe
- remove unused logic and comment
- add copy statement
- guard logic for rope video shape tuple
@naykun naykun requested review from a-r-r-o-w and yiyixuxu and removed request for a-r-r-o-w August 17, 2025 02:56

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

- make fix-copies
- update doc
Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

Thank you!
Will merge now!
(Not sure if the RoPE refactor works completely - I think we need to test for recompilation, but that can be updated and reviewed in a follow-up PR, cc @a-r-r-o-w)

naykun and sayakpaul reacted with heart emoji
@yiyixuxu yiyixuxu merged commit e682af2 into huggingface:main Aug 17, 2025
10 of 11 checks passed
Copy link
Contributor

hi @naykun, where do you find PREFERRED_QWENIMAGE_RESOLUTIONS? Are you basing it solely on FluxKontext?

Copy link
Contributor Author

naykun commented Aug 17, 2025

hi @naykun, where do you find PREFERRED_QWENIMAGE_RESOLUTIONS? Are you basing it solely on FluxKontext?

Hi @TuanNT-ZenAI , while Qwen-Image-Edit was trained on multiple resolutions, we find that the resolution settings from FluxKontext offer a reliable and consistent baseline for inference. These defaults may be refined in future updates.

TuanNT-ZenAI and sayakpaul reacted with heart emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@yiyixuxu yiyixuxu yiyixuxu approved these changes

@a-r-r-o-w a-r-r-o-w Awaiting requested review from a-r-r-o-w

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /