Uh oh!
There was an error while loading. Please reload this page.
fix loop bug in SlicedAttnProcessor - #8836
Conversation
sayakpaul
commented
Jul 11, 2024
Thank you! Do you think our tests need to be updated to catch bugs like this? |
shinetzh
commented
Jul 11, 2024
Bugs like this in test_attention_slicing_forward_pass have been fixed, include "SlicedAttnProcessor" and "SlicedAttnAddedKVProcessor". May be there is no need to catch bugs like this in test_attention_slicing_forward_pass. But maybe tests on other function or module are needed. |
shinetzh
commented
Jul 11, 2024
Or, if it's needed to update the test "test_attention_slicing_forward_pass" to catch bugs like this, I am happy to do that |
shinetzh
commented
Jul 11, 2024
I have update the test_attention_slicing_forward_pass to catch bugs like this. |
HuggingFaceDocBuilderDev
commented
Jul 11, 2024
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. |
shinetzh
commented
Jul 11, 2024
space in blank line have been removed |
yiyixuxu
commented
Jul 17, 2024
thanks for fixing this for us! |
shinetzh
commented
Jul 17, 2024
ok, wait a minute |
shinetzh
commented
Jul 17, 2024
done |
…fix_bug_of_SlicedAttnProcessor
shinetzh
commented
Jul 17, 2024
sorry for tests bug, have fixed it |
yiyixuxu
commented
Jul 17, 2024
hey I think the failing tests are relevant here https://github.com/huggingface/diffusers/actions/runs/9970139809/job/27588409202?pr=8836#step:7:17944 can you look into them? |
…fix_bug_of_SlicedAttnProcessor
shinetzh
commented
Jul 18, 2024
I have look into them, and this is relevant with unet_2d_condition. I change unet_2d_conditon a little, I don't know if this is appropriate. Please check it. |
shinetzh
commented
Jul 18, 2024
This commit: 0ede41c |
| inputs = self.get_dummy_inputs(generator_device) | ||
| output_with_slicing2 = pipe(**inputs)[0] | ||
| pipe.enable_attention_slicing(slice_size=3) |
There was a problem hiding this comment.
can we remove the slice_size=3 test? I think the CI would pass without this, no?
| dim = sliceable_head_dims[i] | ||
| if size is not None and size > dim: | ||
| raise ValueError(f"size {size} has to be smaller or equal to {dim}.") | ||
| slice_size[i] = dim |
There was a problem hiding this comment.
let's try not to make this update and change the test instead (we should try not to update the user inputs for user, we always prefer to be explicit and throw an error message, )
There was a problem hiding this comment.
ok, get it. if remove the slice_size=3, the CI will pass.
…fix_bug_of_SlicedAttnProcessor
shinetzh
commented
Jul 18, 2024
I have remove slice_size=3, and make unet_2d_condition unchanged. |
shinetzh
commented
Jul 18, 2024
* fix loop bug in SlicedAttnProcessor --------- Co-authored-by: neoshang <neoshang@tencent.com>

Fixes # (loop bug in SlicedAttnProcessor)
@sayakpaul@yiyixuxu@DN6