Skip to content
Python

added models overview in guide tab

DeepBeepMeep3ee2f9a433c9
diff --git a/README.md b/README.md
index 9707afc..9d250d2 100644
--- a/README.md
+++ b/README.md
@@ -46,9 +46,13 @@ WanGP supports the Wan (and derived models), Hunyuan Video and LTV Video models
**Ovi 1.1**: This new version exists in two flavors 5s & 10s ! Thanks to WanGP VRAM optimisations only 8 GB will be only needed for a 10s generation. Beware, the Prompt syntax has slightly changed since an audio background is now introduced using *"Audio:"* instead of using tags.
+**Top Models Selection**: if you are new to WanGP or are simply lost among the numerous models offered by WanGP, just check the updated *Guides* tab. You will find a list of highlighted models and advice about how & when to use them.
+
+
*update 9.41*: Added Mocha & Lucy Edit 1.1\
*update 9.42*: Added Ovi 1.1
*update 9.43*: Improved Linux support: no more visual artifacts with fp8 finetunes, auto install ffmpeg, detect audio device, ...
+*update 9.44*: Added links to highlighted models in Guide tab
### November 6 2025: WanGP v9.35, How many bananas are too many bananas ?
@@ -131,41 +135,6 @@ a) move outside the installation WanGP folder the folders **ckpts**, **settings*
b) delete the WanGP folder and reinstall
c) move back what you moved in a)
-## 🔥 Latest Updates :
-### October 6 2025: WanGP v8.999 - A few last things before the Big Unknown ...
-
-This new version hasn't any new model...
-
-...but temptation to upgrade will be high as it contains a few Loras related features that may change your Life:
-- **Ready to use Loras Accelerators Profiles** per type of model that you can apply on your current *Generation Settings*. Next time I will recommend a *Lora Accelerator*, it will be only one click away. And best of all of the required Loras will be downloaded automatically. When you apply an *Accelerator Profile*, input fields like the *Number of Denoising Steps* *Activated Loras*, *Loras Multipliers* (such as "1;0 0;1" ...) will be automatically filled. However your video specific fields will be preserved, so it will be easy to switch between Profiles to experiment. With *WanGP 8.993*, the *Accelerator Loras* are now merged with *Non Accelerator Loras". Things are getting too easy...
-
-- **Embedded Loras URL** : WanGP will now try to remember every Lora URLs it sees. For instance if someone sends you some settings that contain Loras URLs or you extract the Settings of Video generated by a friend with Loras URLs, these URLs will be automatically added to *WanGP URL Cache*. Conversely everything you will share (Videos, Settings, Lset files) will contain the download URLs if they are known. You can also download directly a Lora in WanGP by using the *Download Lora* button a the bottom. The Lora will be immediatly available and added to WanGP lora URL cache. This will work with *Hugging Face* as a repository. Support for CivitAi will come as soon as someone will nice enough to post a GitHub PR ...
-
-- **.lset file** supports embedded Loras URLs. It has never been easier to share a Lora with a friend. As a reminder a .lset file can be created directly from *WanGP Web Interface* and it contains a list of Loras and their multipliers, a Prompt and Instructions how to use these loras (like the Lora's *Trigger*). So with embedded Loras URL, you can send an .lset file by email or share it on discord: it is just a 1 KB tiny text, but with it other people will be able to use Gigabytes Loras as these will be automatically downloaded.
-
-I have created the new Discord Channel **share-your-settings** where you can post your *Settings* or *Lset files*. I will be pleased to add new Loras Accelerators in the list of WanGP *Accelerators Profiles if you post some good ones there.
-
-*With the 8.993 update*, I have added support for **Scaled FP8 format**. As a sample case, I have created finetunes for the **Wan 2.2 PalinGenesis** Finetune which is quite popular recently. You will find it in 3 flavors : *t2v*, *i2v* and *Lightning Accelerated for t2v*.
-
-The *Scaled FP8 format* is widely used as it the format used by ... *ComfyUI*. So I except a flood of Finetunes in the *share-your-finetune* channel. If not it means this feature was useless and I will remove it 😈😈😈
-
-Not enough Space left on your SSD to download more models ? Would like to reuse Scaled FP8 files in your ComfyUI Folder without duplicating them ? Here comes *WanGP 8.994* **Multiple Checkpoints Folders** : you just need to move the files into different folders / hard drives or reuse existing folders and let know WanGP about it in the *Config Tab* and WanGP will be able to put all the parts together.
-
-Last but not least the Lora's documentation has been updated.
-
-*update 8.991*: full power of *Vace Lynx* unleashed with new combinations such as Landscape + Face / Clothes + Face / Injectd Frame (Start/End frames/...) + Face\
-*update 8.992*: optimized gen with Lora, should be 10% faster if many loras\
-*update 8.993*: Support for *Scaled FP8* format and samples *Paligenesis* finetunes, merged Loras Accelerators and Non Accelerators\
-*update 8.994*: Added custom checkpoints folders\
-*update 8.999*: fixed a lora + fp8 bug and version sync for the jump to the unknown
-
-### September 30 2025: WanGP v8.9 - Combinatorics
-
-This new version of WanGP introduces **Wan 2.1 Lynx** the best Control Net so far to transfer *Facial Identity*. You will be amazed to recognize your friends even with a completely different hair style. Congrats to the *Byte Dance team* for this achievement. Lynx works quite with well *Fusionix t2v* 10 steps.
-
-*WanGP 8.9* also illustrate how existing WanGP features can be easily combined with new models. For instance with *Lynx* you will get out of the box *Video to Video* and *Image/Text to Image*.
-
-Another fun combination is *Vace* + *Lynx*, which works much better than *Vace StandIn*. I have added sliders to change the weight of Vace & Lynx to allow you to tune the effects.
@@ -202,6 +171,8 @@ pip install -r requirements.txt
python wgp.py
```
+First time using WanGP ? Just check the *Guides* tab, and you will find a selection of recommended models to use.
+
**Update the application:**
If using Pinokio use Pinokio to update otherwise:
Get in the directory where WanGP is installed and:
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 6a3b1d9..e8ee1de 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -1,4 +1,40 @@
# Changelog
+
+### October 6 2025: WanGP v8.999 - A few last things before the Big Unknown ...
+
+This new version hasn't any new model...
+
+...but temptation to upgrade will be high as it contains a few Loras related features that may change your Life:
+- **Ready to use Loras Accelerators Profiles** per type of model that you can apply on your current *Generation Settings*. Next time I will recommend a *Lora Accelerator*, it will be only one click away. And best of all of the required Loras will be downloaded automatically. When you apply an *Accelerator Profile*, input fields like the *Number of Denoising Steps* *Activated Loras*, *Loras Multipliers* (such as "1;0 0;1" ...) will be automatically filled. However your video specific fields will be preserved, so it will be easy to switch between Profiles to experiment. With *WanGP 8.993*, the *Accelerator Loras* are now merged with *Non Accelerator Loras". Things are getting too easy...
+
+- **Embedded Loras URL** : WanGP will now try to remember every Lora URLs it sees. For instance if someone sends you some settings that contain Loras URLs or you extract the Settings of Video generated by a friend with Loras URLs, these URLs will be automatically added to *WanGP URL Cache*. Conversely everything you will share (Videos, Settings, Lset files) will contain the download URLs if they are known. You can also download directly a Lora in WanGP by using the *Download Lora* button a the bottom. The Lora will be immediatly available and added to WanGP lora URL cache. This will work with *Hugging Face* as a repository. Support for CivitAi will come as soon as someone will nice enough to post a GitHub PR ...
+
+- **.lset file** supports embedded Loras URLs. It has never been easier to share a Lora with a friend. As a reminder a .lset file can be created directly from *WanGP Web Interface* and it contains a list of Loras and their multipliers, a Prompt and Instructions how to use these loras (like the Lora's *Trigger*). So with embedded Loras URL, you can send an .lset file by email or share it on discord: it is just a 1 KB tiny text, but with it other people will be able to use Gigabytes Loras as these will be automatically downloaded.
+
+I have created the new Discord Channel **share-your-settings** where you can post your *Settings* or *Lset files*. I will be pleased to add new Loras Accelerators in the list of WanGP *Accelerators Profiles if you post some good ones there.
+
+*With the 8.993 update*, I have added support for **Scaled FP8 format**. As a sample case, I have created finetunes for the **Wan 2.2 PalinGenesis** Finetune which is quite popular recently. You will find it in 3 flavors : *t2v*, *i2v* and *Lightning Accelerated for t2v*.
+
+The *Scaled FP8 format* is widely used as it the format used by ... *ComfyUI*. So I except a flood of Finetunes in the *share-your-finetune* channel. If not it means this feature was useless and I will remove it 😈😈😈
+
+Not enough Space left on your SSD to download more models ? Would like to reuse Scaled FP8 files in your ComfyUI Folder without duplicating them ? Here comes *WanGP 8.994* **Multiple Checkpoints Folders** : you just need to move the files into different folders / hard drives or reuse existing folders and let know WanGP about it in the *Config Tab* and WanGP will be able to put all the parts together.
+
+Last but not least the Lora's documentation has been updated.
+
+*update 8.991*: full power of *Vace Lynx* unleashed with new combinations such as Landscape + Face / Clothes + Face / Injectd Frame (Start/End frames/...) + Face\
+*update 8.992*: optimized gen with Lora, should be 10% faster if many loras\
+*update 8.993*: Support for *Scaled FP8* format and samples *Paligenesis* finetunes, merged Loras Accelerators and Non Accelerators\
+*update 8.994*: Added custom checkpoints folders\
+*update 8.999*: fixed a lora + fp8 bug and version sync for the jump to the unknown
+
+### September 30 2025: WanGP v8.9 - Combinatorics
+
+This new version of WanGP introduces **Wan 2.1 Lynx** the best Control Net so far to transfer *Facial Identity*. You will be amazed to recognize your friends even with a completely different hair style. Congrats to the *Byte Dance team* for this achievement. Lynx works quite with well *Fusionix t2v* 10 steps.
+
+*WanGP 8.9* also illustrate how existing WanGP features can be easily combined with new models. For instance with *Lynx* you will get out of the box *Video to Video* and *Image/Text to Image*.
+
+Another fun combination is *Vace* + *Lynx*, which works much better than *Vace StandIn*. I have added sliders to change the weight of Vace & Lynx to allow you to tune the effects.
+
### September 28 2025: WanGP v8.76 - ~~Here Are Two Three New Contenders in the Vace Arena !~~ The Never Ending Release
So in ~~today's~~ this release you will find two Wannabe Vace that covers each only a subset of Vace features but offers some interesting advantages:
diff --git a/docs/OVERVIEW.md b/docs/OVERVIEW.md
new file mode 100644
index 0000000..4e35add
--- /dev/null
+++ b/docs/OVERVIEW.md
@@ -0,0 +1,15 @@
+**WanGP** support many diferent models. Some of them are just better. You will find below a selection.
+
+Hit any link below to load that model in the Video Generator instantly.
+
+| Role | Model | Why pick it |
+| --- | --- | --- |
+| Video editing, face injection, spatial & temporal outpainting | [Wan 2.1 VACE](modeltype:vace_14B) | Load a control video, mask the regions you want to affect using Matanyone, and let the model replace faces, patch damaged areas, or extend the scene outside the original frame. If you are looking for an accelerated version of Vace usable out of the box, just try [Vace Fusionix](modeltype:vace_14B_fusionix). |
+| Identity-preserving face replacement | [Lynx](modeltype:lynx), [Vace Lynx](modeltype:vace_lynx_14B) | Optimized to keep facial identity even when the hair style, clothes, or lighting change. Feed reference portraits, adjust the Lynx weight sliders, and blend with a VACE pass when you need both background cleanup and face swaps. |
+| Motion transfer & performer replacement | [Wan 2.2 Animate](modeltype:animate) | Built for body/facial motion transfers: capture a pose/control video, extract masks with Mat Anyone, and it will replace or animate the target performer. Includes relighting, maskless mode (faster but less precise), and WanGP-exclusive outpainting so new characters stay anchored in the scene. |
+| Multi-speaker lip-sync & dialogue | [MultiTalk](modeltype:multitalk), [InfiniteTalk](modeltype:infinitetalk) | Drop one or two voice tracks, assign speakers, and the model handles lip-sync, gestures, and camera moves. InfiniteTalk mode chains sliding windows so very long monologues/conversations remain coherent. |
+| High-fidelity image editing & inpainting | [Qwen Image Edit](modeltype:qwen_image_edit_plus_20B) | Generates or edits high-resolution stills with multi-subject control and long text captions. Works best at 720p, supports brush-based inpainting/outpainting, and has Lightning LoRAs (4-step/8-step) for faster iterations—ideal for prepping key frames before video runs. |
+| Storyboarding with first / last frames | [Wan 2.2 i2v](modeltype:i2v_2_2) + [Qwen Image Edit](modeltype:qwen_image_edit_plus_20B) | Supply “first frame” and “last frame” stills for every beat using Qwen, then have Wan generate the motion bridge between them (similar to Nano Banana + Kling loops). Recycle the previous last frame as the next first frame to build entire scenes. As an alternative to i2v use, [InfiniteTalk](modeltype:infinitetalk) (without a speaker) as it offers fluid scene transitions. |
+| Fast stylized skits | [Ovi 1.1](modeltype:ovi_1_1_10s) | Very fun and fast at generating videos with talking characters. Two presets (5 s / 10 s) that run on 6–8 GB VRAM and respond well to FastWan accelerators (~10× faster). |
+| Cinematic, long text-to-video | [LTX Video 0.98](modeltype:ltxv_distilled) | Generates 720p clips up to 1 minute. Supports IC-LoRAs (pose, depth, canny, detailer) so you can guide motion or add an internal upscaling pass without leaving WanGP. |
+| Voice cloning / dubbing | [Chatterbox](modeltype:chatterbox) | Give it a short clean voice sample and it reproduces that voice (many languages) in 10–15 s clips. Save the WAV, drop it into MultiTalk/InfiniteTalk, and your avatars now speak with the cloned voice. |
diff --git a/plugins/wan2gp-guides/plugin.py b/plugins/wan2gp-guides/plugin.py
index 780616f..e9014cf 100644
--- a/plugins/wan2gp-guides/plugin.py
+++ b/plugins/wan2gp-guides/plugin.py
@@ -7,8 +7,14 @@ class GuidesPlugin(WAN2GPPlugin):
self.name = "Guides Tab"
self.version = "1.0.0"
self.description = "Guides for using WAN2GP"
+ self.goto_model_type = None
def setup_ui(self):
+ self.request_component("state")
+ self.request_component("main_tabs")
+ self.request_component("model_choice_target")
+ self.request_global("goto_model_type")
+ self.add_custom_js(self._script_block())
self.add_tab(
tab_id="info",
label="Guides",
@@ -32,9 +38,26 @@ class GuidesPlugin(WAN2GPPlugin):
with open("docs/PLUGINS.md", "r", encoding="utf-8") as reader:
plugins = reader.read()
- with gr.Tabs() :
- with gr.Tab("Models", id="models"):
- gr.Markdown(models)
+ with open("docs/OVERVIEW.md", "r", encoding="utf-8") as reader:
+ overview = reader.read()
+
+ with gr.Tabs():
+ with gr.Tab("Overview", id="overview"):
+ gr.Markdown(overview, elem_id="guides_overview_markdown")
+ gr.HTML("<style>.guides-hidden-controls{display:none !important;}</style>")
+ with gr.Row(elem_classes="guides-hidden-controls"):
+ model_selection = gr.Text(value="", label="", elem_id="guides_overview_target")
+ apply_btn = gr.Button("Apply Selection", elem_id="guides_overview_trigger")
+ apply_btn.click(
+ fn=self._apply_overview_selection,
+ inputs=[self.state, model_selection],
+ outputs=[self.model_choice_target],
+ show_progress="hidden"
+ ).then(
+ fn=self.goto_video_tab,
+ inputs=[self.state],
+ outputs=[self.main_tabs]
+ )
with gr.Tab("Loras", id="loras"):
gr.Markdown(loras)
with gr.Tab("Vace", id="vace"):
@@ -42,4 +65,59 @@ class GuidesPlugin(WAN2GPPlugin):
with gr.Tab("Finetunes", id="finetunes"):
gr.Markdown(finetunes)
with gr.Tab("Plugins", id="plugins"):
- gr.Markdown(plugins)
\ No newline at end of file
+ gr.Markdown(plugins)
+
+ def _apply_overview_selection(self, state, model_type):
+ return model_type
+
+ def _script_block(self) -> str:
+ return """
+ (function () {
+ const RETRY_DELAY = 500;
+
+ function root() {
+ if (window.gradioApp) return window.gradioApp();
+ const app = document.querySelector("gradio-app");
+ return app ? (app.shadowRoot || app) : document;
+ }
+
+ function bindOverviewLinks() {
+ const appRoot = root();
+ if (!appRoot) return false;
+ const markdown = appRoot.querySelector("#guides_overview_markdown");
+ const targetInput = appRoot.querySelector("#guides_overview_target textarea, #guides_overview_target input");
+ let triggerButton = appRoot.querySelector("#guides_overview_trigger");
+
+ if (!markdown || !targetInput || !triggerButton) return false;
+
+ if (!triggerButton.matches("button")) {
+ const innerButton = triggerButton.querySelector("button");
+ if (innerButton) triggerButton = innerButton;
+ }
+
+ if (markdown.dataset.guidesBound === "1") return true;
+ markdown.dataset.guidesBound = "1";
+
+ markdown.addEventListener("click", (event) => {
+ const anchor = event.target.closest("a");
+ if (!anchor) return;
+ const hrefValue = anchor.getAttribute("href") || "";
+ if (!hrefValue.startsWith("modeltype:")) return;
+ event.preventDefault();
+ const modelType = hrefValue.replace("modeltype:", "").trim();
+ if (!modelType) return;
+ targetInput.value = modelType;
+ targetInput.dispatchEvent(new Event("input", { bubbles: true }));
+ triggerButton.click();
+ });
+
+ return true;
+ }
+
+ function ensureBinding() {
+ if (!bindOverviewLinks()) setTimeout(ensureBinding, RETRY_DELAY);
+ }
+
+ ensureBinding();
+ })();
+"""
diff --git a/plugins/wan2gp-sample/plugin.py b/plugins/wan2gp-sample/plugin.py
index 3fe26f2..63e2eca 100644
--- a/plugins/wan2gp-sample/plugin.py
+++ b/plugins/wan2gp-sample/plugin.py
@@ -58,9 +58,6 @@ class ConfigTabPlugin(WAN2GPPlugin):
release_GPU(state)
return "42"
- def goto_video_tab(state):
- return self.goto_video_tab(state)
-
with gr.Column():
state = self.state
settings = self.get_current_model_settings(state.value)
@@ -89,7 +86,7 @@ class ConfigTabPlugin(WAN2GPPlugin):
)
goto_btn.click(
- fn=goto_video_tab,
+ fn=self.goto_video_tab,
inputs=[state],
outputs=[ self.main_tabs ]
)
diff --git a/shared/utils/plugins.py b/shared/utils/plugins.py
index a351fcd..775b9ff 100644
--- a/shared/utils/plugins.py
+++ b/shared/utils/plugins.py
@@ -87,6 +87,7 @@ class WAN2GPPlugin:
self._data_hooks: Dict[str, List[callable]] = {}
self.tab_ids: List[str] = []
self._set_wgp_global_func = None
+ self._custom_js_snippets: List[str] = []
def setup_ui(self) -> None:
pass
@@ -128,6 +129,14 @@ class WAN2GPPlugin:
self._data_hooks[hook_name] = []
self._data_hooks[hook_name].append(callback)
+ def add_custom_js(self, js_code: str) -> None:
+ if isinstance(js_code, str) and js_code.strip():
+ self._custom_js_snippets.append(js_code)
+
+ @property
+ def custom_js_snippets(self) -> List[str]:
+ return self._custom_js_snippets.copy()
+
def insert_after(self, target_component_id: str, new_component_constructor: callable) -> None:
if not hasattr(self, '_insert_after_requests'):
self._insert_after_requests = []
@@ -147,6 +156,7 @@ class PluginManager:
sys.path.insert(0, self.plugins_dir)
self.data_hooks: Dict[str, List[callable]] = {}
self.restricted_globals: Set[str] = set()
+ self.custom_js_snippets: List[str] = []
def get_plugins_info(self) -> List[Dict[str, str]]:
plugins_info = []
@@ -340,6 +350,7 @@ class PluginManager:
return sorted(discovered)
def load_plugins_from_directory(self, enabled_user_plugins: List[str]) -> None:
+ self.custom_js_snippets = []
plugins_to_load = SYSTEM_PLUGINS + [p for p in enabled_user_plugins if p not in SYSTEM_PLUGINS]
for plugin_dir_name in self.discover_plugins():
@@ -353,6 +364,8 @@ class PluginManager:
plugin = obj()
plugin.setup_ui()
self.plugins[plugin_dir_name] = plugin
+ if plugin.custom_js_snippets:
+ self.custom_js_snippets.extend(plugin.custom_js_snippets)
for hook_name, callbacks in plugin._data_hooks.items():
if hook_name not in self.data_hooks:
self.data_hooks[hook_name] = []
@@ -367,6 +380,11 @@ class PluginManager:
def get_all_plugins(self) -> Dict[str, WAN2GPPlugin]:
return self.plugins.copy()
+ def get_custom_js(self) -> str:
+ if not self.custom_js_snippets:
+ return ""
+ return "\n".join(self.custom_js_snippets)
+
def inject_globals(self, global_references: Dict[str, Any]) -> None:
for plugin_id, plugin in self.plugins.items():
try:
@@ -490,10 +508,10 @@ class WAN2GPApplication:
self.plugin_manager.inject_globals(wgp_globals)
def setup_ui_tabs(self, main_tabs_component: gr.Tabs, state_component: gr.State, set_save_form_event):
- self._create_plugin_tabs()
+ self._create_plugin_tabs(main_tabs_component, state_component)
self._setup_tab_events(main_tabs_component, state_component, set_save_form_event)
- def _create_plugin_tabs(self):
+ def _create_plugin_tabs(self, main_tabs, state):
if not hasattr(self, 'plugin_manager'):
return
@@ -517,12 +535,20 @@ class WAN2GPApplication:
post_user_tabs = [t for t in system_tabs if t.get('position', -1) >= USER_PLUGIN_INSERT_POSITION]
all_tabs_to_render = pre_user_tabs + sorted_user_tabs + post_user_tabs
+
+ def goto_video_tab(state):
+ self._handle_tab_selection(state, None)
+ return gr.Tabs(selected="video_gen")
+
for tab_info in all_tabs_to_render:
with gr.Tab(tab_info['label'], id=f"plugin_{tab_info['id']}") as new_tab:
self.all_rendered_tabs.append(new_tab)
+ plugin = self.tab_to_plugin_map[new_tab.label]
+ plugin.goto_video_tab = goto_video_tab
tab_info['component_constructor']()
+
def _setup_tab_events(self, main_tabs_component: gr.Tabs, state_component: gr.State, set_save_form_event):
if main_tabs_component and state_component:
main_tabs_component.select(
@@ -532,9 +558,6 @@ class WAN2GPApplication:
show_progress="hidden",
)
- def goto_video_tab(state):
- self._handle_tab_selection(state, None)
- return gr.Tabs(selected="video_gen")
for tab in self.all_rendered_tabs:
# def test_tab(state_component, evt: gr.SelectData):
@@ -546,7 +569,6 @@ class WAN2GPApplication:
plugin = self.tab_to_plugin_map[tab.label]
- plugin.goto_video_tab = goto_video_tab
# event = tab.select(fn=test_tab, inputs=[state_component])
# event = set_save_form_event(event.then)
event = set_save_form_event(tab.select)
diff --git a/wgp.py b/wgp.py
index 24b5171..784a40e 100644
--- a/wgp.py
+++ b/wgp.py
@@ -82,7 +82,7 @@ global_queue_ref = []
AUTOSAVE_FILENAME = "queue.zip"
PROMPT_VARS_MAX = 10
target_mmgp_version = "3.6.8"
-WanGP_version = "9.43"
+WanGP_version = "9.44"
settings_version = 2.40
max_source_video_frames = 3000
prompt_enhancer_image_caption_model, prompt_enhancer_image_caption_processor, prompt_enhancer_llm_model, prompt_enhancer_llm_tokenizer = None, None, None, None
@@ -7311,6 +7311,10 @@ def load_settings_from_file(state, file_path):
set_model_settings(state, model_type, configs)
return *generate_dropdown_model_list(model_type), gr.update(), None
+def goto_model_type(state, model_type):
+ gen = get_gen_info(state)
+ return *generate_dropdown_model_list(model_type), gr.update()
+
def reset_settings(state):
model_type = state["model_type"]
ui_defaults = get_default_settings(model_type)
@@ -9036,6 +9040,8 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non
fill_wizard_prompt_trigger = gr.Text(interactive= False, visible=False)
save_form_trigger = gr.Text(interactive= False, visible=False)
gallery_source = gr.Text(interactive= False, visible=False)
+ model_choice_target = gr.Text(interactive= False, visible=False)
+
with gr.Accordion("Video Info and Late Post Processing & Audio Remuxing", open=False) as video_info_accordion:
with gr.Tabs() as video_info_tabs:
@@ -9357,6 +9363,15 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non
).then(fn=load_settings_from_file, inputs =[state, settings_file] , outputs= [model_family, model_base_type_choice, model_choice, refresh_form_trigger, settings_file])
+ model_choice_target.change(fn=validate_wizard_prompt,
+ inputs= [state, wizard_prompt_activated_var, wizard_variables_var, prompt, wizard_prompt, *prompt_vars] ,
+ outputs= [prompt],
+ show_progress="hidden",
+ ).then(fn=save_inputs,
+ inputs =[target_state] + gen_inputs,
+ outputs= None
+ ).then(fn=goto_model_type, inputs =[state, model_choice_target] , outputs= [model_family, model_base_type_choice, model_choice, refresh_form_trigger])
+
reset_settings_btn.click(fn=validate_wizard_prompt,
inputs= [state, wizard_prompt_activated_var, wizard_variables_var, prompt, wizard_prompt, *prompt_vars] ,
outputs= [prompt],
@@ -10247,6 +10262,7 @@ def create_ui():
js = """
function() {
+ console.log("[WanGP] main JS initialized");
window.updateAndTrigger = function(action) {
const hiddenTextbox = document.querySelector('#queue_action_input textarea');
const hiddenButton = document.querySelector('#queue_action_trigger');
@@ -10367,10 +10383,15 @@ def create_ui():
}, { capture: true, passive: true });
"""
js += AudioGallery.get_javascript()
+ app.initialize_plugins(globals())
+ plugin_js = ""
+ if hasattr(app, "plugin_manager"):
+ plugin_js = app.plugin_manager.get_custom_js()
+ if isinstance(plugin_js, str) and plugin_js.strip():
+ js += f"\n{plugin_js}\n"
js += """
}
"""
- app.initialize_plugins(globals())
if server_config.get("display_stats", 0) == 1:
from shared.utils.stats import SystemStatsApp
stats_app = SystemStatsApp()