From 8039080ea4b3359738fd682fb49d0ed77f588000 Mon Sep 17 00:00:00 2001 From: deepbeepmeep <84379123+deepbeepmeep@users.noreply.github.com> Date: Sat, 9 Aug 2025 12:25:20 +0200 Subject: [PATCH] fixed auto switch attention --- wgp.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wgp.py b/wgp.py index a44c77e..b92fb5f 100644 --- a/wgp.py +++ b/wgp.py @@ -3988,11 +3988,9 @@ def generate_video( overridden_attention = get_overridden_attention(model_type) # if overridden_attention is not None and overridden_attention != attention_mode: print(f"Attention mode has been overriden to {overridden_attention} for model type '{model_type}'") attn = overridden_attention if overridden_attention is not None else attention_mode - if attention_mode == "auto": + if attn == "auto": attn = get_auto_attention() - elif attention_mode in attention_modes_supported: - attn = attention_mode - else: + elif not attn in attention_modes_supported: send_cmd("info", f"You have selected attention mode '{attention_mode}'. However it is not installed or supported on your system. You should either install it or switch to the default 'sdpa' attention.") send_cmd("exit") return