diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-20 05:18:02 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-20 05:18:02 +0000 |
commit | 930b4c64f7dbce6918894d53538003e5959fd022 (patch) | |
tree | a0a0a42838d72ad412cc330b9181b2ec8c1f77fd /modules/hypernetworks/ui.py | |
parent | 1e4809b251d478a102fd980dcfc26e21d6d3730b (diff) | |
download | stable-diffusion-webui-gfx803-930b4c64f7dbce6918894d53538003e5959fd022.tar.gz stable-diffusion-webui-gfx803-930b4c64f7dbce6918894d53538003e5959fd022.tar.bz2 stable-diffusion-webui-gfx803-930b4c64f7dbce6918894d53538003e5959fd022.zip |
allow float sizes for hypernet's layer_structure
Diffstat (limited to 'modules/hypernetworks/ui.py')
-rw-r--r-- | modules/hypernetworks/ui.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/hypernetworks/ui.py b/modules/hypernetworks/ui.py index 08f75f15..e0741d08 100644 --- a/modules/hypernetworks/ui.py +++ b/modules/hypernetworks/ui.py @@ -15,7 +15,7 @@ def create_hypernetwork(name, enable_sizes, layer_structure=None, add_layer_norm assert not os.path.exists(fn), f"file {fn} already exists"
if type(layer_structure) == str:
- layer_structure = tuple(map(int, re.sub(r'\D', '', layer_structure)))
+ layer_structure = [float(x.strip()) for x in layer_structure.split(",")]
hypernet = modules.hypernetworks.hypernetwork.Hypernetwork(
name=name,
|