Skip to content

flux kontext transformer single blocks forward behavior changed #12071

@WingEdge777

Description

@WingEdge777

Describe the bug

I observed that this line of code(

hidden_states = torch.cat([encoder_hidden_states, hidden_states], dim=1)
) was added for First Block Cache.

However, it not only increases the computation, but also thoroughly changes the forward logic; encoder_hidden_states will affect hidden_states because of attention in this and subsequent blocks within the whole denoising loop. Is that right?

I'm also confused by the questions. The FluxSingleTransformerBlock is designed to mix hidden_states with encoder_hidden_states( prompt_embedding, in this case) or not?

Reproduction

no need

Logs

System Info

no need

Who can help?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions