mirror of
https://github.com/oobabooga/textgen.git
synced 2026-07-23 11:20:54 -05:00
Fix image generation: default to SDPA attention backend
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user