Skip to content

ACE Step 1.5 produces garbage with --use-sage-attention #12270

Closed

Description

@rkfg

Custom Node Testing

Expected Behavior

Song is generated normally

Actual Behavior

Instead getting this mess with the default AIO workflow:
ComfyUI_00003_.mp3

Steps to Reproduce

Run ComfyUI with --use-sage-attention and use the template workflow

Debug Logs

comfyui-1  | 2026-02-04T07:25:31.917416605Z got prompt
comfyui-1  | 2026-02-04T07:25:32.038756083Z model weight dtype torch.bfloat16, manual cast: None
comfyui-1  | 2026-02-04T07:25:32.041089523Z model_type FLOW
comfyui-1  | 2026-02-04T07:25:32.618697700Z VAE load device: cuda:0, offload device: cpu, dtype: torch.float16
comfyui-1  | 2026-02-04T07:25:33.241210567Z CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
comfyui-1  | 2026-02-04T07:25:33.346581859Z Requested to load ACE15TEModel_
comfyui-1  | 2026-02-04T07:25:33.757827192Z loaded completely; 27091.74 MB usable, 4673.04 MB loaded, full load: True
comfyui-1  | 2026-02-04T07:25:39.934119570Z Requested to load ACEStep15
comfyui-1  | 2026-02-04T07:25:40.337753251Z loaded completely; 22230.13 MB usable, 4565.35 MB loaded, full load: True
100%|██████████| 8/8 [00:00<00:00, 17.16it/s]
comfyui-1  | 2026-02-04T07:25:40.848348156Z Requested to load AudioOobleckVAE
comfyui-1  | 2026-02-04T07:25:40.885166041Z loaded completely;  321.70 MB loaded, full load: True
comfyui-1  | 2026-02-04T07:25:43.738979740Z Prompt executed in 11.77 seconds
comfyui-1  | 2026-02-04T07:25:43.740067427Z Prompt executed in 11.77 seconds
comfyui-1  | 2026-02-04T07:25:43.899293153Z free_memory complete

Other

Confirmed by many users, the only solution is to turn off Sage attention globally by not using that parameter. But it's so useful as it speeds up all other workflows and only breaks AS 1.5! Possible solution would be overriding attention with pytorch one, unfortunately, the override from KJ Nodes doesn't solve this as it can't forcibly disable Sage I presume.

Activity

  1. added
    Potential BugUser is reporting a bug. This should be tested.
    on Feb 4, 2026
  2. iamrohitanshu commented on Feb 4, 2026

    @iamrohitanshu

    I have an RTX 3060 12GB. SageAttn worked great with Wan workflows.
    But Qwen, Anima and AceStep, and also an IPAdapter for SDXL arch, have problems or generate black images with SageAttn.
    Not finding any solutions, I now keep 2 bat start files, one with SageAttn and one with --force-upcast-attention, which uses pytorch attn by default.

  3. rkfg commented on Feb 4, 2026

    @rkfg
    ContributorAuthor

    Temporary hack:

    diff --git a/comfy/ldm/ace/ace_step15.py b/comfy/ldm/ace/ace_step15.py
    index d9054965..6a391b66 100644
    --- a/comfy/ldm/ace/ace_step15.py
    +++ b/comfy/ldm/ace/ace_step15.py
    @@ -3,7 +3,7 @@ import torch
     import torch.nn as nn
     import torch.nn.functional as F
     import itertools
    -from comfy.ldm.modules.attention import optimized_attention
    +from comfy.ldm.modules.attention import attention_pytorch
     import comfy.model_management
     from comfy.ldm.flux.layers import timestep_embedding
     
    @@ -183,7 +183,7 @@ class AceStepAttention(nn.Module):
                 else:
                     attn_bias = window_bias
     
    -        attn_output = optimized_attention(query_states, key_states, value_states, self.num_heads, attn_bias, skip_reshape=True)
    +        attn_output = attention_pytorch(query_states, key_states, value_states, self.num_heads, attn_bias, skip_reshape=True)
             attn_output = self.o_proj(attn_output)
     
             return attn_output

    This simply replaces the currently selected attention method with PyTorch attention. No checks are performed so if you don't have it working it will fail. But I assume it should work on any modern Torch. Sage Attention doesn't bring any benefits to ACE Step 1.5 anyway since the model is already lightning fast. With this simple patch you can keep running ComfyUI with --use-sage-attention flag and it will still work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Potential BugUser is reporting a bug. This should be tested.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions