Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
81823407
Commit
81823407
authored
Feb 04, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add --no-hashing
parent
30228c67
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
2 deletions
+9
-2
hashes.py
modules/hashes.py
+4
-0
hypernetwork.py
modules/hypernetworks/hypernetwork.py
+1
-1
sd_models.py
modules/sd_models.py
+3
-0
shared.py
modules/shared.py
+1
-1
No files found.
modules/hashes.py
View file @
81823407
...
...
@@ -4,6 +4,7 @@ import os.path
import
filelock
from
modules
import
shared
from
modules.paths
import
data_path
...
...
@@ -68,6 +69,9 @@ def sha256(filename, title):
if
sha256_value
is
not
None
:
return
sha256_value
if
shared
.
cmd_opts
.
no_hashing
:
return
None
print
(
f
"Calculating sha256 for {filename}: "
,
end
=
''
)
sha256_value
=
calculate_sha256
(
filename
)
print
(
f
"{sha256_value}"
)
...
...
modules/hypernetworks/hypernetwork.py
View file @
81823407
...
...
@@ -307,7 +307,7 @@ class Hypernetwork:
def
shorthash
(
self
):
sha256
=
hashes
.
sha256
(
self
.
filename
,
f
'hypernet/{self.name}'
)
return
sha256
[
0
:
10
]
return
sha256
[
0
:
10
]
if
sha256
else
None
def
list_hypernetworks
(
path
):
...
...
modules/sd_models.py
View file @
81823407
...
...
@@ -59,6 +59,9 @@ class CheckpointInfo:
def
calculate_shorthash
(
self
):
self
.
sha256
=
hashes
.
sha256
(
self
.
filename
,
"checkpoint/"
+
self
.
name
)
if
self
.
sha256
is
None
:
return
self
.
shorthash
=
self
.
sha256
[
0
:
10
]
if
self
.
shorthash
not
in
self
.
ids
:
...
...
modules/shared.py
View file @
81823407
...
...
@@ -106,7 +106,7 @@ parser.add_argument("--tls-certfile", type=str, help="Partially enables TLS, req
parser
.
add_argument
(
"--server-name"
,
type
=
str
,
help
=
"Sets hostname of server"
,
default
=
None
)
parser
.
add_argument
(
"--gradio-queue"
,
action
=
'store_true'
,
help
=
"Uses gradio queue; experimental option; breaks restart UI button"
)
parser
.
add_argument
(
"--skip-version-check"
,
action
=
'store_true'
,
help
=
"Do not check versions of torch and xformers"
)
parser
.
add_argument
(
"--no-hashing"
,
action
=
'store_true'
,
help
=
"disable sha256 hashing of checkpoints to help loading performance"
,
default
=
False
)
script_loading
.
preload_extensions
(
extensions
.
extensions_dir
,
parser
)
...
...
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