diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

[refactor] enhance readability of flux related pipelines

Open Luciennnnnnn opened this issue 1 year ago • 6 comments

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 avatar Oct 18 '24 12:10 Luciennnnnnn

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.

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

yiyixuxu avatar Oct 21 '24 23:10 yiyixuxu

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

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

Luciennnnnnn avatar Oct 22 '24 02:10 Luciennnnnnn

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

Done!

Luciennnnnnn avatar Oct 22 '24 02:10 Luciennnnnnn

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

Luciennnnnnn avatar Oct 22 '24 02:10 Luciennnnnnn

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

Luciennnnnnn avatar Oct 23 '24 01:10 Luciennnnnnn

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 https://github.com/huggingface/diffusers/blob/24c7d578baf6a8b79890101dd280278fff031d12/examples/dreambooth/train_dreambooth_flux.py#L1543

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

yiyixuxu avatar Oct 23 '24 23:10 yiyixuxu

@yiyixuxu

Would you be interested in working on that?

Sure! I have updated training example accordingly.

Luciennnnnnn avatar Oct 24 '24 01:10 Luciennnnnnn