Skip to content

Patch Sage Attention KJ Node Error - also still with v1.1.7 freshly pulled #424

Description

@hwprinz

...on ComfyUI Version: v0.3.64-1-g3e0eb8d3 | Released on '2025-10-08'

File "D:\ComfyUI\ComfyUI_windows_portable1\ComfyUI\comfy\ldm\flux\math.py", line 20, in attention
x = optimized_attention(q, k, v, heads, skip_reshape=True, mask=mask, transformer_options=transformer_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\ComfyUI_windows_portable1\python_embeded\Lib\site-packages\torch_dynamo\eval_frame.py", line 929, in _fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
TypeError: BaseLoaderKJ._patch_modules..attention_sage() got an unexpected keyword argument 'transformer_options'

i changed line 134 from:
def attention_sage(q, k, v, heads, mask=None, attn_precision=None, skip_reshape=False, skip_output_reshape=False, transformer_options=None):

to:
def attention_sage(q, k, v, heads, mask=None, attn_precision=None, skip_reshape=False, skip_output_reshape=False, **kwargs):

as with #386

would be nice to get it into a release

Thanks /hans

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions