Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
c664b231
Commit
c664b231
authored
Oct 19, 2022
by
AUTOMATIC1111
Committed by
GitHub
Oct 19, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3162 from discus0434/master
Added what I forgot to commit in already merged PR: #3086
parents
f510a227
365d4b16
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
modules/hypernetworks/ui.py
modules/hypernetworks/ui.py
+4
-0
modules/ui.py
modules/ui.py
+1
-1
No files found.
modules/hypernetworks/ui.py
View file @
c664b231
import
html
import
os
import
re
import
gradio
as
gr
...
...
@@ -13,6 +14,9 @@ def create_hypernetwork(name, enable_sizes, layer_structure=None, add_layer_norm
fn
=
os
.
path
.
join
(
shared
.
cmd_opts
.
hypernetwork_dir
,
f
"{name}.pt"
)
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
)))
hypernet
=
modules
.
hypernetworks
.
hypernetwork
.
Hypernetwork
(
name
=
name
,
enable_sizes
=
[
int
(
x
)
for
x
in
enable_sizes
],
...
...
modules/ui.py
View file @
c664b231
...
...
@@ -1217,7 +1217,7 @@ def create_ui(wrap_gradio_gpu_call):
with
gr
.
Tab
(
label
=
"Create hypernetwork"
):
new_hypernetwork_name
=
gr
.
Textbox
(
label
=
"Name"
)
new_hypernetwork_sizes
=
gr
.
CheckboxGroup
(
label
=
"Modules"
,
value
=
[
"768"
,
"320"
,
"640"
,
"1280"
],
choices
=
[
"768"
,
"320"
,
"640"
,
"1280"
])
new_hypernetwork_layer_structure
=
gr
.
Dropdown
(
label
=
"Hypernetwork layer structure"
,
choices
=
[(
1
,
2
,
1
),
(
1
,
2
,
2
,
1
),
(
1
,
2
,
4
,
2
,
1
)]
)
new_hypernetwork_layer_structure
=
gr
.
Textbox
(
"1, 2, 1"
,
label
=
"Enter hypernetwork layer structure"
,
placeholder
=
"1st and last digit must be 1. ex:'1, 2, 1'"
)
new_hypernetwork_add_layer_norm
=
gr
.
Checkbox
(
label
=
"Add layer normalization"
)
with
gr
.
Row
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment