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
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
modules/sd_models.py
modules/sd_models.py
+8
-10
modules/textual_inversion/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
model_dir
=
"Stable-diffusion"
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'
])
checkpoints_list
=
{}
...
...
@@ -30,12 +27,10 @@ except Exception:
pass
def
setup_model
(
dirname
):
global
user_dir
user_dir
=
dirname
def
setup_model
():
if
not
os
.
path
.
exists
(
model_path
):
os
.
makedirs
(
model_path
)
checkpoints_list
.
clear
()
list_models
()
...
...
@@ -45,7 +40,7 @@ def checkpoint_tiles():
def
list_models
():
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
):
abspath
=
os
.
path
.
abspath
(
path
)
...
...
@@ -106,8 +101,11 @@ def select_checkpoint():
if
len
(
checkpoints_list
)
==
0
:
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
)
print
(
f
" - directory {os.path.abspath(shared.cmd_opts.ckpt_dir)}"
,
file
=
sys
.
stderr
)
if
shared
.
cmd_opts
.
ckpt
is
not
None
:
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
)
exit
(
1
)
...
...
modules/textual_inversion/ui.py
View file @
a1cde7e6
...
...
@@ -22,7 +22,7 @@ def train_embedding(*args):
embedding
,
filename
=
ti
.
train_embedding
(
*
args
)
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)}
"""
return
res
,
""
...
...
webui.py
View file @
a1cde7e6
...
...
@@ -23,7 +23,7 @@ from modules.paths import script_path
from
modules.shared
import
cmd_opts
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
)
gfpgan
.
setup_model
(
cmd_opts
.
gfpgan_models_path
)
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