[diffusion] fix: keep fused qk-norm-rope out of dynamo tracing (#31849)
This commit is contained in:
@@ -1021,6 +1021,7 @@ def apply_qk_norm_rope(
|
||||
if (
|
||||
fused_enabled
|
||||
and _is_cuda
|
||||
and not torch.compiler.is_compiling()
|
||||
and allow_inplace
|
||||
and (q_eps == k_eps)
|
||||
and q.dtype in (torch.float16, torch.bfloat16)
|
||||
|
||||
@@ -737,7 +737,7 @@ class QwenImageCrossAttention(nn.Module):
|
||||
k=img_key,
|
||||
q_norm=self.norm_q,
|
||||
k_norm=self.norm_k,
|
||||
head_dim=img_query.shape[-1],
|
||||
head_dim=self.head_dim,
|
||||
cos_sin_cache=img_cache,
|
||||
is_neox=False,
|
||||
allow_inplace=True,
|
||||
@@ -747,7 +747,7 @@ class QwenImageCrossAttention(nn.Module):
|
||||
k=txt_key,
|
||||
q_norm=self.norm_added_q,
|
||||
k_norm=self.norm_added_k,
|
||||
head_dim=txt_query.shape[-1],
|
||||
head_dim=self.head_dim,
|
||||
cos_sin_cache=txt_cache,
|
||||
is_neox=False,
|
||||
allow_inplace=True,
|
||||
|
||||
Reference in New Issue
Block a user