Movatterモバイル変換


[0]ホーム

URL:


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

[fix] Flux Kontext resize method#11863

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Net-Mist wants to merge2 commits intohuggingface:main
base:main
Choose a base branch
Loading
fromNet-Mist:fix_flux_resize

Conversation

Net-Mist
Copy link
Contributor

@Net-MistNet-Mist commentedJul 4, 2025
edited
Loading

What does this PR do?

Hello !

When working on Flux-Kontext, I discovered a silent bug regarding the resizing of the image, when calling the pipeline with several images.

  • The__call__ method of theFluxKontextPipeline class takes animage of typeOptional[PipelineImageInput]. This variable can be a list in case of batch size > 1
  • then theresize method of theVaeImageProcessor class is called (image = self.image_processor.resize(image, image_height, image_width)). But this method does not support lists as input. Due to the way this method is written (overriding theimage variable and then returning it), it doesn't resize the image and return it as-is.

In this fix, I corrected this by changing a minimal number of lines of code to handle lists. However, please let me know if you'd prefer that I also add additional input checks or safeguards.

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@Net-Mist
Copy link
ContributorAuthor

@yiyixuxu@asomoza
If I'm not mistaken, you are the 2 most relevant people for this PR. Else, sorry for the noise, and please redirect me to the right people

@Net-MistNet-Mist changed the title[fix] VaeImageProcessor.resize method can take list as input[fix] Flux Kontext resize methodJul 7, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@Net-Mist

[8]ページ先頭

©2009-2025 Movatter.jp