diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Improve control net block index for sd3

Open linjiapro opened this issue 1 year ago • 5 comments

What does this PR do?

The layer configuration for the Control Net in Stable Diffusion 3 models must adhere to the rule that the total number of layers in the SD3 model should be a multiple of the Control Net's layer count.

For SD3.5, which has 38 layers, the Control Net can only have three possible options: 2, 19, or 38. This leads to inefficiencies in the setup.

Who can review?

@sayakpaul @yiyixuxu @DN6

linjiapro avatar Oct 23 '24 22:10 linjiapro

cc @sayakpaul @yiyixuxu @DN6

linjiapro avatar Oct 23 '24 22:10 linjiapro

This is a very simple PR, but for some reason, the tests all failed for wired reasons such as:

Unable to find self-hosted runner group: 'aws-general-8-plus'.

linjiapro avatar Oct 23 '24 22:10 linjiapro

Thanks for your contributions! Could you maybe also add a test for this?

sayakpaul avatar Oct 24 '24 00:10 sayakpaul

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.

@sayakpaul

There is an existing test for the pipeline of SD3 control net, I leveraged that. The layer number for the control net changed from 1 to 3, the number of layer of the transformer (4) is no longer the multiples of the number of layers of control net. This will test the code changes of this PR.

linjiapro avatar Oct 24 '24 06:10 linjiapro

@sayakpaul @yiyixuxu, can we take a look at this? Thanks

linjiapro avatar Nov 15 '24 09:11 linjiapro

maybe @DN6 is more active.

bghira avatar Nov 16 '24 16:11 bghira

can you run make style and make fix-copies?

yiyixuxu avatar Nov 20 '24 09:11 yiyixuxu