diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-21 06:58:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 06:58:16 +0000 |
commit | e4877722e3e02b2da1ddacc0c7be25e6559c02f3 (patch) | |
tree | 7c66a3eba0a8a8149900056c6511146182b02276 /modules/hypernetworks/ui.py | |
parent | 2273e752fb3e578f1047f6d38b96330b07bf61a9 (diff) | |
parent | 0c5522ea211370046a2ca628e92d35a7c8c97972 (diff) | |
download | stable-diffusion-webui-gfx803-e4877722e3e02b2da1ddacc0c7be25e6559c02f3.tar.gz stable-diffusion-webui-gfx803-e4877722e3e02b2da1ddacc0c7be25e6559c02f3.tar.bz2 stable-diffusion-webui-gfx803-e4877722e3e02b2da1ddacc0c7be25e6559c02f3.zip |
Merge pull request #3197 from AUTOMATIC1111/training-help-text
Training UI Changes
Diffstat (limited to 'modules/hypernetworks/ui.py')
-rw-r--r-- | modules/hypernetworks/ui.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/hypernetworks/ui.py b/modules/hypernetworks/ui.py index 1a5a27d8..266f04f6 100644 --- a/modules/hypernetworks/ui.py +++ b/modules/hypernetworks/ui.py @@ -10,9 +10,10 @@ 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, activation_func=None):
+def create_hypernetwork(name, enable_sizes, overwrite_old, 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"
+ if not overwrite_old:
+ assert not os.path.exists(fn), f"file {fn} already exists"
if type(layer_structure) == str:
layer_structure = [float(x.strip()) for x in layer_structure.split(",")]
|