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
a1cde7e6
Commit
a1cde7e6
authored
Oct 02, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disabled SD model download after multiple complaints
parent
3ff0de2c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
sd_models.py
modules/sd_models.py
+8
-10
ui.py
modules/textual_inversion/ui.py
+1
-1
webui.py
webui.py
+1
-1
No files found.
modules/sd_models.py
View file @
a1cde7e6
...
@@ -13,9 +13,6 @@ from modules.paths import models_path
...
@@ -13,9 +13,6 @@ from modules.paths import models_path
model_dir
=
"Stable-diffusion"
model_dir
=
"Stable-diffusion"
model_path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
models_path
,
model_dir
))
model_path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
models_path
,
model_dir
))
model_name
=
"sd-v1-4.ckpt"
model_url
=
"https://drive.yerf.org/wl/?id=EBfTrmcCCUAGaQBXVIj5lJmEhjoP1tgl&mode=grid&download=1"
user_dir
=
None
CheckpointInfo
=
namedtuple
(
"CheckpointInfo"
,
[
'filename'
,
'title'
,
'hash'
,
'model_name'
])
CheckpointInfo
=
namedtuple
(
"CheckpointInfo"
,
[
'filename'
,
'title'
,
'hash'
,
'model_name'
])
checkpoints_list
=
{}
checkpoints_list
=
{}
...
@@ -30,12 +27,10 @@ except Exception:
...
@@ -30,12 +27,10 @@ except Exception:
pass
pass
def
setup_model
(
dirname
):
def
setup_model
():
global
user_dir
user_dir
=
dirname
if
not
os
.
path
.
exists
(
model_path
):
if
not
os
.
path
.
exists
(
model_path
):
os
.
makedirs
(
model_path
)
os
.
makedirs
(
model_path
)
checkpoints_list
.
clear
()
list_models
()
list_models
()
...
@@ -45,7 +40,7 @@ def checkpoint_tiles():
...
@@ -45,7 +40,7 @@ def checkpoint_tiles():
def
list_models
():
def
list_models
():
checkpoints_list
.
clear
()
checkpoints_list
.
clear
()
model_list
=
modelloader
.
load_models
(
model_path
=
model_path
,
model_url
=
model_url
,
command_path
=
user_dir
,
ext_filter
=
[
".ckpt"
],
download_name
=
model_name
)
model_list
=
modelloader
.
load_models
(
model_path
=
model_path
,
command_path
=
shared
.
cmd_opts
.
ckpt_dir
,
ext_filter
=
[
".ckpt"
]
)
def
modeltitle
(
path
,
shorthash
):
def
modeltitle
(
path
,
shorthash
):
abspath
=
os
.
path
.
abspath
(
path
)
abspath
=
os
.
path
.
abspath
(
path
)
...
@@ -106,8 +101,11 @@ def select_checkpoint():
...
@@ -106,8 +101,11 @@ def select_checkpoint():
if
len
(
checkpoints_list
)
==
0
:
if
len
(
checkpoints_list
)
==
0
:
print
(
f
"No checkpoints found. When searching for checkpoints, looked at:"
,
file
=
sys
.
stderr
)
print
(
f
"No checkpoints found. When searching for checkpoints, looked at:"
,
file
=
sys
.
stderr
)
print
(
f
" - file {os.path.abspath(shared.cmd_opts.ckpt)}"
,
file
=
sys
.
stderr
)
if
shared
.
cmd_opts
.
ckpt
is
not
None
:
print
(
f
" - directory {os.path.abspath(shared.cmd_opts.ckpt_dir)}"
,
file
=
sys
.
stderr
)
print
(
f
" - file {os.path.abspath(shared.cmd_opts.ckpt)}"
,
file
=
sys
.
stderr
)
print
(
f
" - directory {model_path}"
,
file
=
sys
.
stderr
)
if
shared
.
cmd_opts
.
ckpt_dir
is
not
None
:
print
(
f
" - directory {os.path.abspath(shared.cmd_opts.ckpt_dir)}"
,
file
=
sys
.
stderr
)
print
(
f
"Can't run without a checkpoint. Find and place a .ckpt file into any of those locations. The program will exit."
,
file
=
sys
.
stderr
)
print
(
f
"Can't run without a checkpoint. Find and place a .ckpt file into any of those locations. The program will exit."
,
file
=
sys
.
stderr
)
exit
(
1
)
exit
(
1
)
...
...
modules/textual_inversion/ui.py
View file @
a1cde7e6
...
@@ -22,7 +22,7 @@ def train_embedding(*args):
...
@@ -22,7 +22,7 @@ def train_embedding(*args):
embedding
,
filename
=
ti
.
train_embedding
(
*
args
)
embedding
,
filename
=
ti
.
train_embedding
(
*
args
)
res
=
f
"""
res
=
f
"""
Training {'interrupted' if shared.state.interrupted else 'finished'} a
fter
{embedding.step} steps.
Training {'interrupted' if shared.state.interrupted else 'finished'} a
t
{embedding.step} steps.
Embedding saved to {html.escape(filename)}
Embedding saved to {html.escape(filename)}
"""
"""
return
res
,
""
return
res
,
""
...
...
webui.py
View file @
a1cde7e6
...
@@ -23,7 +23,7 @@ from modules.paths import script_path
...
@@ -23,7 +23,7 @@ from modules.paths import script_path
from
modules.shared
import
cmd_opts
from
modules.shared
import
cmd_opts
modelloader
.
cleanup_models
()
modelloader
.
cleanup_models
()
modules
.
sd_models
.
setup_model
(
cmd_opts
.
ckpt_dir
)
modules
.
sd_models
.
setup_model
()
codeformer
.
setup_model
(
cmd_opts
.
codeformer_models_path
)
codeformer
.
setup_model
(
cmd_opts
.
codeformer_models_path
)
gfpgan
.
setup_model
(
cmd_opts
.
gfpgan_models_path
)
gfpgan
.
setup_model
(
cmd_opts
.
gfpgan_models_path
)
shared
.
face_restorers
.
append
(
modules
.
face_restoration
.
FaceRestoration
())
shared
.
face_restorers
.
append
(
modules
.
face_restoration
.
FaceRestoration
())
...
...
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