aboutsummaryrefslogtreecommitdiffstats
path: root/modules/hypernetworks/ui.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-18 07:12:17 +0000
committerGitHub <noreply@github.com>2023-05-18 07:12:17 +0000
commit182330ae40c93b761fced8d03bbdd8523f1739d0 (patch)
treec95f2e531cc34475eb39266add6d12a2a5e1e2b3 /modules/hypernetworks/ui.py
parent0d31f20cbd556ea4ba3d8ad9254bcce71c32088c (diff)
parent983f2c494ad8fed2f08193681ba0bf5dda01555a (diff)
downloadstable-diffusion-webui-gfx803-182330ae40c93b761fced8d03bbdd8523f1739d0.tar.gz
stable-diffusion-webui-gfx803-182330ae40c93b761fced8d03bbdd8523f1739d0.tar.bz2
stable-diffusion-webui-gfx803-182330ae40c93b761fced8d03bbdd8523f1739d0.zip
Merge branch 'dev' into ngrok-py
Diffstat (limited to 'modules/hypernetworks/ui.py')
-rw-r--r--modules/hypernetworks/ui.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/hypernetworks/ui.py b/modules/hypernetworks/ui.py
index 76599f5a..8b6255e2 100644
--- a/modules/hypernetworks/ui.py
+++ b/modules/hypernetworks/ui.py
@@ -1,19 +1,17 @@
import html
-import os
-import re
import gradio as gr
import modules.hypernetworks.hypernetwork
from modules import devices, sd_hijack, shared
not_available = ["hardswish", "multiheadattention"]
-keys = list(x for x in modules.hypernetworks.hypernetwork.HypernetworkModule.activation_dict.keys() if x not in not_available)
+keys = [x for x in modules.hypernetworks.hypernetwork.HypernetworkModule.activation_dict if x not in not_available]
def create_hypernetwork(name, enable_sizes, overwrite_old, layer_structure=None, activation_func=None, weight_init=None, add_layer_norm=False, use_dropout=False, dropout_structure=None):
filename = modules.hypernetworks.hypernetwork.create_hypernetwork(name, enable_sizes, overwrite_old, layer_structure, activation_func, weight_init, add_layer_norm, use_dropout, dropout_structure)
- return gr.Dropdown.update(choices=sorted([x for x in shared.hypernetworks.keys()])), f"Created: {filename}", ""
+ return gr.Dropdown.update(choices=sorted(shared.hypernetworks)), f"Created: {filename}", ""
def train_hypernetwork(*args):