Fix image generation: default to SDPA attention backend

This commit is contained in:
oobabooga 2026-04-05 20:03:06 -07:00
parent b1d06dcf96
commit 05e4842033
2 changed files with 2 additions and 2 deletions

View file

@ -129,7 +129,7 @@ def load_image_model(model_name, dtype='bfloat16', attn_backend='sdpa', cpu_offl
modules = ["transformer", "unet"]
# Set attention backend
# Set attention backend (diffusers defaults to native/SDPA)
if attn_backend == 'flash_attention_2':
for name in modules:
mod = getattr(pipe, name, None)

View file

@ -364,7 +364,7 @@ settings = {
'image_llm_variations_prompt': 'Write a variation of the image generation prompt above. Consider the intent of the user with that prompt and write something that will likely please them, with added details. Output only the new prompt. Do not add any explanations, prefixes, or additional text.',
'image_model_menu': 'None',
'image_dtype': 'bfloat16',
'image_attn_backend': 'flash_attention_2',
'image_attn_backend': 'sdpa',
'image_cpu_offload': False,
'image_compile': False,
'image_quant': 'none',