diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-05-22 04:15:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-22 04:15:34 +0000 |
commit | 8137bdba61fd57cc1ddae801f6080d51e13d70c5 (patch) | |
tree | c5a02e9f9ae57c9f0ff8499379c6cc61a97c094e /modules/hypernetworks/ui.py | |
parent | a862428902c4aecde8852761c3a4d95c196885cb (diff) | |
parent | 3366e494a1147e570d8527eea19da88edb3a1e0c (diff) | |
download | stable-diffusion-webui-gfx803-8137bdba61fd57cc1ddae801f6080d51e13d70c5.tar.gz stable-diffusion-webui-gfx803-8137bdba61fd57cc1ddae801f6080d51e13d70c5.tar.bz2 stable-diffusion-webui-gfx803-8137bdba61fd57cc1ddae801f6080d51e13d70c5.zip |
Merge branch 'dev' into text-drag-fix
Diffstat (limited to 'modules/hypernetworks/ui.py')
-rw-r--r-- | modules/hypernetworks/ui.py | 6 |
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):
|