Skip to content
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

[refactor] enhance readability of flux related pipelines #9711

Merged
merged 4 commits into from
Oct 25, 2024

Conversation

Luciennnnnnn
Copy link
Contributor

What does this PR do?

This PR refactors the FLUX-related pipelines to improve clarity and consistency, particularly in regards to height and width determination. The changes align the implementation more closely with other pipelines in the library, enhancing overall code coherence and maintainability.

The original code obscured the details of how latents packing affects resolution, but this change makes the process more transparent and easier to understand.

@yiyixuxu @asomoza

@Luciennnnnnn Luciennnnnnn changed the title flux pipline: readability enhancement. [refactor] enhance readability of flux related pipelines Oct 18, 2024
@HuggingFaceDocBuilderDev

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.

Copy link
Collaborator

@DN6 DN6 left a comment

Choose a reason for hiding this comment

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

Nice clean up! 👍🏽

@yiyixuxu
Copy link
Collaborator

@Luciennnnnnn can you run make style and make fix-copies?

@Luciennnnnnn
Copy link
Contributor Author

@Luciennnnnnn can you run make style and make fix-copies?

Sure! This is my first contribution to diffusers, i'll try it

@Luciennnnnnn
Copy link
Contributor Author

@Luciennnnnnn can you run make style and make fix-copies?

Done!

@Luciennnnnnn
Copy link
Contributor Author

The previous commit is failed on two checks, after modification, how to rerun checks

@Luciennnnnnn
Copy link
Contributor Author

Hi @yiyixuxu , I see checks failed on FLUX training examples, which is not related to my PR. How can I pass it?

@yiyixuxu
Copy link
Collaborator

yiyixuxu commented Oct 23, 2024

Hi @Luciennnnnnn thanks for the PR! It is a really nice PR
these failures are actually related to the PR. You did not "break" the training examples! but because they were using some of the pipeline methods/ config/logic that we changed, we will need to update them too for example here

vae_scale_factor = 2 ** (len(vae.config.block_out_channels))

Would you be interested in working on that? If not, I can take over when I have a little bit more time:)

@Luciennnnnnn
Copy link
Contributor Author

Luciennnnnnn commented Oct 24, 2024

@yiyixuxu

Would you be interested in working on that?

Sure! I have updated training example accordingly.

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.

Thanks @Luciennnnnnn
really nice job:) hope to see more of your PRs soon

@yiyixuxu yiyixuxu merged commit 73b59f5 into huggingface:main Oct 25, 2024
15 checks passed
sayakpaul pushed a commit that referenced this pull request Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants