Python
added setting sdpa override, blocked sage with rtx30xx+zimage base
DeepBeepMeep31438d5fe923
diff --git a/README.md b/README.mdindex be22842..4395ca5 100644--- a/README.md+++ b/README.md@@ -34,7 +34,7 @@ WanGP supports the Wan (and derived models), Hunyuan Video, Flux, Qwen, Z-Image,## 🔥 Latest Updates :-### January 27th 2026: WanGP v10.54, Music for your Hearts+### January 27th 2026: WanGP v10.55, Music for your HeartsWanGP Special *TTS* (Text To Speech) Release:@@ -48,7 +48,9 @@ WanGP Special *TTS* (Text To Speech) Release:- **Custom Output folder for Audio Gens**: you can now choose a different folder for the *Audio Outputs*- **Default Memory Profile for Audio Models**: TTS models can get very slow if you use profile 4 (being autoregressive models, they will need to load all the layers one per one to generate one single audio token then rinse & repeat). On the other hand, they dont't need as much VRAM, so you can now define a more agressive profile (3+ for instance)-- **Z Image Base**: try it if you are into the *Z Image* hype but it will be probably useless for you unless you are a researcher and / or want to build a finetune out of it. This model requires from 35 to 50 steps (4x to 6x slower than *Z Image turbo*) and cfg > 1 (an additional 2x slower) and there is no *Reinforcement Learning* so Output Images wont be as good. The plus side is a higher diversity and *Native Negative Prompt* (versus Z Image virtual Negative Prompt using *NAG*)+- **Z Image Base**: try it if you are into the *Z Image* hype but it will be probably useless for you unless you are a researcher and / or want to build a finetune out of it. This model requires from 35 to 50 steps (4x to 6x slower than *Z Image turbo*) and cfg > 1 (an additional 2x slower) and there is no *Reinforcement Learning* so Output Images wont be as good. The plus side is a higher diversity and *Native Negative Prompt* (versus Z Image virtual Negative Prompt using *NAG*).++Note that Z Image Base is very sensitive to the *Attention Mode*: it is not compatible with *Sage 1* as it produces black frames. So I have disabled Sage for RTX 30xx. Also there are reports it produces some vertical banding artifacts with *Sage 2*- **Various Improvements**:- Video /Audio Galleries now support deletions of gens done outside WanGP@@ -56,11 +58,14 @@ WanGP Special *TTS* (Text To Speech) Release:- *Check for Updates* button for *Plugins* to see in a glance if any of your plugin can be updated- *Prompt Enhancer* generates a different enhanced prompt each timee you click on it. You can define in the config tab its gen parameters (top k, temperature)- New *Root Loras* folder can be defined in the config Tab. Useful if you have multiple WanGP instances or want to store easily all your loras in a different hard drive+ - added new setting *Attention Mode Override" in the *Misc* tab+ - Experimental: allowed changing *Configuration* during a *Generation**update 10.51*: new Heart Mula Finetune better at following instructions, Extra settings (cfg, top k) for TTS models, Rife v4\*update 10.52*: updated plugin list and added version tracking\*update 10.53*: video/audio galleries now support deletions\-*update 10.54*: added Z Image Omnibase, prompt enhancers improvements, configurable loras root folder+*update 10.54*: added Z Image Base, prompt enhancers improvements, configurable loras root folder\+*update 10.55*: blocked Sage with Z Image on RTX30xx and added override attention mode settings, allowed changing config during generation### January 20th 2026: WanGP v10.43, The Cost Saver*GPUs are expensive, RAM is expensive, SSD are expensive, sadly we live now in a GPU & RAM poor.*diff --git a/defaults/z_image_base.json b/defaults/z_image_base.jsonindex 7c2e00f..69375ef 100644--- a/defaults/z_image_base.json+++ b/defaults/z_image_base.json@@ -6,7 +6,10 @@"URLs": ["https://huggingface.co/DeepBeepMeep/Z-Image/resolve/main/ZImageBase_bf16.safetensors","https://huggingface.co/DeepBeepMeep/Z-Image/resolve/main/ZImageBase_quanto_bf16_int8.safetensors"- ]+ ],+ "attention": {+ "<89": "sdpa"+ }},"resolution": "1024x1024","batch_size": 1,diff --git a/models/_settings.json b/models/_settings.jsonindex 7798da8..ceb2a3f 100644--- a/models/_settings.json+++ b/models/_settings.json@@ -81,6 +81,7 @@"RIFLEx_setting": 0,"force_fps": "","override_profile": -1,+ "override_attention": "","output_filename": "","activated_loras": [],"loras_multipliers": "",diff --git a/plugins/wan2gp-configuration/plugin.py b/plugins/wan2gp-configuration/plugin.pyindex 1421bba..c493a13 100644--- a/plugins/wan2gp-configuration/plugin.py+++ b/plugins/wan2gp-configuration/plugin.py@@ -29,6 +29,7 @@ class ConfigTabPlugin(WAN2GPPlugin):self.request_global("attention_modes_supported")self.request_global("displayed_model_types")self.request_global("memory_profile_choices")+ self.request_global("attention_modes_choices")self.request_global("save_path")self.request_global("image_save_path")self.request_global("audio_save_path")@@ -87,22 +88,8 @@ class ConfigTabPlugin(WAN2GPPlugin):interactive=not self.args.lock_config)- def check_attn(mode):- if mode not in self.attention_modes_installed: return " (NOT INSTALLED)"- if mode not in self.attention_modes_supported: return " (NOT SUPPORTED)"- return ""-self.attention_choice = gr.Dropdown(- choices=[- ("Auto: Best available (sage2 > sage > sdpa)", "auto"),- ("sdpa: Default, always available", "sdpa"),- (f'flash{check_attn("flash")}: High quality, requires manual install', "flash"),- (f'xformers{check_attn("xformers")}: Good quality, less VRAM, requires manual install', "xformers"),- (f'sage{check_attn("sage")}: ~30% faster, requires manual install', "sage"),- (f'sage2/sage2++{check_attn("sage2")}: ~40% faster, requires manual install', "sage2"),- ] + ([(f'radial{check_attn("radial")}: Experimental, may be faster, requires manual install', "radial")] if self.args.betatest else []) + [- (f'sage3{check_attn("sage3")}: >50% faster, may have quality trade-offs, requires manual install', "sage3"),- ],+ choices=self.attention_modes_choices,value=self.attention_mode, label="Attention Type", interactive=not self.args.lock_config)self.preload_model_policy_choice = gr.CheckboxGroup(@@ -323,8 +310,8 @@ class ConfigTabPlugin(WAN2GPPlugin):return [self.release_RAM_btn]def _save_changes(self, state, *args):- if self.is_generation_in_progress():- return "<div style='color:red; text-align:center;'>Unable to change config when a generation is in progress.</div>", *[gr.update()]*5+ gen_in_progress = self.is_generation_in_progress()+ # return "<div style='color:red; text-align:center;'>Unable to change config when a generation is in progress.</div>", *[gr.update()]*5if self.args.lock_config:return "<div style='color:red; text-align:center;'>Configuration is locked by command-line arguments.</div>", *[gr.update()]*5@@ -459,9 +446,14 @@ class ConfigTabPlugin(WAN2GPPlugin):model_family_update, model_base_type_update, model_choice_update = self.generate_dropdown_model_list(model_type)header_update = self.generate_header(model_type, compile=new_server_config["compile"], attention_mode=new_server_config["attention_mode"])-- return (- "<div style='color:green; text-align:center;'>The new configuration has been succesfully applied.</div>",++ if gen_in_progress:+ msg = "<div style='color:green; text-align:center;'>The new configuration has been succesfully applied. Some of the Settings will be only effective when you will start another Generation</div>"+ else:+ msg = "<div style='color:green; text-align:center;'>The new configuration has been succesfully applied.</div>"++ return (msg+ ,header_update,model_family_update,model_base_type_update,diff --git a/wgp.py b/wgp.pyindex 7a2d91f..568bf1f 100644--- a/wgp.py+++ b/wgp.py@@ -85,7 +85,7 @@ AUTOSAVE_TEMPLATE_PATH = AUTOSAVE_FILENAMECONFIG_FILENAME = "wgp_config.json"PROMPT_VARS_MAX = 10target_mmgp_version = "3.7.2"-WanGP_version = "10.54"+WanGP_version = "10.55"settings_version = 2.44max_source_video_frames = 3000prompt_enhancer_image_caption_model, prompt_enhancer_image_caption_processor, prompt_enhancer_llm_model, prompt_enhancer_llm_tokenizer = None, None, None, None@@ -5481,6 +5481,7 @@ def generate_video(prompt_enhancer,min_frames_if_references,override_profile,+ override_attention,pace,exaggeration,temperature,@@ -5573,7 +5574,7 @@ def generate_video(if args.test:send_cmd("info", "Test mode: model loaded, skipping generation.")return- overridden_attention = get_overridden_attention(model_type)+ overridden_attention = override_attention if len(override_attention) else 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_modeif attn == "auto":@@ -8357,6 +8358,7 @@ def save_inputs(prompt_enhancer,min_frames_if_references,override_profile,+ override_attention,pace,exaggeration,temperature,@@ -9024,6 +9026,22 @@ memory_profile_choices= [ ("Profile 1, HighRAM_HighVRAM: at least 64 GB of RAM("Profile 4+, LowRAM_LowVRAM+: at least 32 GB of RAM and 12 GB of VRAM, variant of Profile 4, slightly slower but needs less VRAM",4.5),("Profile 5, VerylowRAM_LowVRAM (Fail safe): at least 24 GB of RAM and 10 GB of VRAM, if you don't have much it won't be fast but maybe it will work",5)]+def check_attn(mode):+ if mode not in attention_modes_installed: return " (NOT INSTALLED)"+ if mode not in attention_modes_supported: return " (NOT SUPPORTED)"+ return ""++attention_modes_choices= [+ ("Auto: Best available (sage2 > sage > sdpa)", "auto"),+ ("sdpa: Default, always available", "sdpa"),+ (f'flash{check_attn("flash")}: High quality, requires manual install', "flash"),+ (f'xformers{check_attn("xformers")}: Good quality, less VRAM, requires manual install', "xformers"),+ (f'sage{check_attn("sage")}: ~30% faster, requires manual install', "sage"),+ (f'sage2/sage2++{check_attn("sage2")}: ~40% faster, requires manual install', "sage2"),+] + ([(f'radial{check_attn("radial")}: Experimental, may be faster, requires manual install', "radial")] if args.betatest else []) + [+ (f'sage3{check_attn("sage3")}: >50% faster, may have quality trade-offs, requires manual install', "sage3"),+]+def detect_auto_save_form(state, evt:gr.SelectData):last_tab_id = state.get("last_tab_id", 0)state["last_tab_id"] = new_tab_id = evt.index@@ -10147,6 +10165,13 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Nonlabel=f"Override Memory Profile")+ gr.Markdown("<B>You can set a different Attention Mode to improve the quality / compatibility<B>")+ override_attention = gr.Dropdown(+ choices=[("Default Attention Mode", "")] + attention_modes_choices,+ value=ui_get("override_attention"),+ label=f"Override Attention Mode"+ )+with gr.Column():gr.Markdown('<B>Customize the Output Filename using Settings Values (<I>date, seed, resolution, num_inference_steps, prompt, flow_shift, video_length, guidance_scale</I>). For Instance:<BR>"<I>{date(YYYY-MM-DD_HH-mm-ss)}_{seed}_{prompt(50)}, {num_inference_steps}</I>"</B>')output_filename = gr.Text( label= " Output Filename ( Leave Blank for Auto Naming)", value= ui_get("output_filename"))