diff options
author | Learwin <6223515+Learwin@users.noreply.github.com> | 2023-12-30 20:52:27 +0000 |
---|---|---|
committer | Learwin <6223515+Learwin@users.noreply.github.com> | 2023-12-30 20:52:27 +0000 |
commit | bc5ae74c7d8949bab37e260b16e76889b9968099 (patch) | |
tree | 8bd498b7cceb850cd5a9ba461bf4cd9eba43696b /modules | |
parent | 8100e901ab0c5b04d289eebb722c8a653b8beef1 (diff) | |
download | stable-diffusion-webui-gfx803-bc5ae74c7d8949bab37e260b16e76889b9968099.tar.gz stable-diffusion-webui-gfx803-bc5ae74c7d8949bab37e260b16e76889b9968099.tar.bz2 stable-diffusion-webui-gfx803-bc5ae74c7d8949bab37e260b16e76889b9968099.zip |
Added negative prompts to extra networks lora
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ui_extra_networks.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index fe5d3ba3..b8c02241 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -223,7 +223,10 @@ class ExtraNetworksPage: onclick = item.get("onclick", None)
if onclick is None:
- onclick = '"' + html.escape(f"""return cardClicked({quote_js(tabname)}, {item["prompt"]}, {"true" if self.allow_negative_prompt else "false"})""") + '"'
+ if "negative_prompt" in item:
+ onclick = '"' + html.escape(f"""return cardClicked({quote_js(tabname)}, {item["prompt"]}, {item["negative_prompt"]}, {"true" if self.allow_negative_prompt else "false"})""") + '"'
+ else:
+ onclick = '"' + html.escape(f"""return cardClicked({quote_js(tabname)}, {item["prompt"]}, {'""'}, {"true" if self.allow_negative_prompt else "false"})""") + '"'
height = f"height: {shared.opts.extra_networks_card_height}px;" if shared.opts.extra_networks_card_height else ''
width = f"width: {shared.opts.extra_networks_card_width}px;" if shared.opts.extra_networks_card_width else ''
|