aboutsummaryrefslogtreecommitdiffstats
path: root/modules/hypernetworks/ui.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-10-21 06:34:45 +0000
committerGitHub <noreply@github.com>2022-10-21 06:34:45 +0000
commita26fc2834c86d9e90e2d336ba670017552f38d29 (patch)
tree19c2de5ae51ea056fad748903300aa1a08c7eed3 /modules/hypernetworks/ui.py
parent12a97c5368e29402d05d03d5f6e766e4a3889917 (diff)
parentf8733ad08be08bafb40f4299785590e11f049e96 (diff)
downloadstable-diffusion-webui-gfx803-a26fc2834c86d9e90e2d336ba670017552f38d29.tar.gz
stable-diffusion-webui-gfx803-a26fc2834c86d9e90e2d336ba670017552f38d29.tar.bz2
stable-diffusion-webui-gfx803-a26fc2834c86d9e90e2d336ba670017552f38d29.zip
Merge pull request #3199 from discus0434/master
Add features to insert activation functions to hypernetworks
Diffstat (limited to 'modules/hypernetworks/ui.py')
-rw-r--r--modules/hypernetworks/ui.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/hypernetworks/ui.py b/modules/hypernetworks/ui.py
index e0741d08..1a5a27d8 100644
--- a/modules/hypernetworks/ui.py
+++ b/modules/hypernetworks/ui.py
@@ -10,7 +10,7 @@ from modules import sd_hijack, shared, devices
from modules.hypernetworks import hypernetwork
-def create_hypernetwork(name, enable_sizes, layer_structure=None, add_layer_norm=False):
+def create_hypernetwork(name, enable_sizes, layer_structure=None, add_layer_norm=False, activation_func=None):
fn = os.path.join(shared.cmd_opts.hypernetwork_dir, f"{name}.pt")
assert not os.path.exists(fn), f"file {fn} already exists"
@@ -22,6 +22,7 @@ def create_hypernetwork(name, enable_sizes, layer_structure=None, add_layer_norm
enable_sizes=[int(x) for x in enable_sizes],
layer_structure=layer_structure,
add_layer_norm=add_layer_norm,
+ activation_func=activation_func,
)
hypernet.save(fn)