Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Overbill1683
Stable Diffusion Webui
提交
b12de850
S
Stable Diffusion Webui
项目概览
Overbill1683
/
Stable Diffusion Webui
11 个月 前同步成功
通知
1759
Star
81
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
分析
仓库
DevOps
项目成员
Pages
S
Stable Diffusion Webui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
b12de850
编写于
12月 25, 2022
作者:
A
AUTOMATIC1111
提交者:
GitHub
12月 25, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5992 from yuvalabou/F541
Fix F541: f-string without any placeholders
上级
a66514e1
3bf5591e
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
18 addition
and
18 deletion
+18
-18
extensions-builtin/LDSR/ldsr_model_arch.py
extensions-builtin/LDSR/ldsr_model_arch.py
+1
-1
modules/codeformer/vqgan_arch.py
modules/codeformer/vqgan_arch.py
+2
-2
modules/hypernetworks/hypernetwork.py
modules/hypernetworks/hypernetwork.py
+2
-2
modules/images.py
modules/images.py
+1
-1
modules/interrogate.py
modules/interrogate.py
+1
-1
modules/safe.py
modules/safe.py
+4
-4
modules/sd_models.py
modules/sd_models.py
+4
-4
modules/sd_vae.py
modules/sd_vae.py
+1
-1
modules/textual_inversion/textual_inversion.py
modules/textual_inversion/textual_inversion.py
+1
-1
scripts/prompts_from_file.py
scripts/prompts_from_file.py
+1
-1
未找到文件。
extensions-builtin/LDSR/ldsr_model_arch.py
浏览文件 @
b12de850
...
...
@@ -26,7 +26,7 @@ class LDSR:
global
cached_ldsr_model
if
shared
.
opts
.
ldsr_cached
and
cached_ldsr_model
is
not
None
:
print
(
f
"Loading model from cache"
)
print
(
"Loading model from cache"
)
model
:
torch
.
nn
.
Module
=
cached_ldsr_model
else
:
print
(
f
"Loading model from
{
self
.
modelPath
}
"
)
...
...
modules/codeformer/vqgan_arch.py
浏览文件 @
b12de850
...
...
@@ -382,7 +382,7 @@ class VQAutoEncoder(nn.Module):
self
.
load_state_dict
(
torch
.
load
(
model_path
,
map_location
=
'cpu'
)[
'params'
])
logger
.
info
(
f
'vqgan is loaded from:
{
model_path
}
[params]'
)
else
:
raise
ValueError
(
f
'Wrong params!'
)
raise
ValueError
(
'Wrong params!'
)
def
forward
(
self
,
x
):
...
...
@@ -431,7 +431,7 @@ class VQGANDiscriminator(nn.Module):
elif
'params'
in
chkpt
:
self
.
load_state_dict
(
torch
.
load
(
model_path
,
map_location
=
'cpu'
)[
'params'
])
else
:
raise
ValueError
(
f
'Wrong params!'
)
raise
ValueError
(
'Wrong params!'
)
def
forward
(
self
,
x
):
return
self
.
main
(
x
)
\ No newline at end of file
modules/hypernetworks/hypernetwork.py
浏览文件 @
b12de850
...
...
@@ -277,7 +277,7 @@ def load_hypernetwork(filename):
print
(
traceback
.
format_exc
(),
file
=
sys
.
stderr
)
else
:
if
shared
.
loaded_hypernetwork
is
not
None
:
print
(
f
"Unloading hypernetwork"
)
print
(
"Unloading hypernetwork"
)
shared
.
loaded_hypernetwork
=
None
...
...
@@ -443,7 +443,7 @@ def train_hypernetwork(hypernetwork_name, learn_rate, batch_size, gradient_step,
initial_step
=
hypernetwork
.
step
or
0
if
initial_step
>=
steps
:
shared
.
state
.
textinfo
=
f
"Model has already been trained beyond specified max steps"
shared
.
state
.
textinfo
=
"Model has already been trained beyond specified max steps"
return
hypernetwork
,
filename
scheduler
=
LearnRateScheduler
(
learn_rate
,
steps
,
initial_step
)
...
...
modules/images.py
浏览文件 @
b12de850
...
...
@@ -599,7 +599,7 @@ def read_info_from_image(image):
Negative prompt:
{
json_info
[
"uc"
]
}
Steps:
{
json_info
[
"steps"
]
}
, Sampler:
{
sampler
}
, CFG scale:
{
json_info
[
"scale"
]
}
, Seed:
{
json_info
[
"seed"
]
}
, Size:
{
image
.
width
}
x
{
image
.
height
}
, Clip skip: 2, ENSD: 31337"""
except
Exception
:
print
(
f
"Error parsing NovelAI image generation parameters:"
,
file
=
sys
.
stderr
)
print
(
"Error parsing NovelAI image generation parameters:"
,
file
=
sys
.
stderr
)
print
(
traceback
.
format_exc
(),
file
=
sys
.
stderr
)
return
geninfo
,
items
...
...
modules/interrogate.py
浏览文件 @
b12de850
...
...
@@ -172,7 +172,7 @@ class InterrogateModels:
res
+=
", "
+
match
except
Exception
:
print
(
f
"Error interrogating"
,
file
=
sys
.
stderr
)
print
(
"Error interrogating"
,
file
=
sys
.
stderr
)
print
(
traceback
.
format_exc
(),
file
=
sys
.
stderr
)
res
+=
"<error>"
...
...
modules/safe.py
浏览文件 @
b12de850
...
...
@@ -137,15 +137,15 @@ def load_with_extra(filename, extra_handler=None, *args, **kwargs):
except
pickle
.
UnpicklingError
:
print
(
f
"Error verifying pickled file from
{
filename
}
:"
,
file
=
sys
.
stderr
)
print
(
traceback
.
format_exc
(),
file
=
sys
.
stderr
)
print
(
f
"-----> !!!! The file is most likely corrupted !!!! <-----"
,
file
=
sys
.
stderr
)
print
(
f
"You can skip this check with --disable-safe-unpickle commandline argument, but that is not going to help you.
\n\n
"
,
file
=
sys
.
stderr
)
print
(
"-----> !!!! The file is most likely corrupted !!!! <-----"
,
file
=
sys
.
stderr
)
print
(
"You can skip this check with --disable-safe-unpickle commandline argument, but that is not going to help you.
\n\n
"
,
file
=
sys
.
stderr
)
return
None
except
Exception
:
print
(
f
"Error verifying pickled file from
{
filename
}
:"
,
file
=
sys
.
stderr
)
print
(
traceback
.
format_exc
(),
file
=
sys
.
stderr
)
print
(
f
"
\n
The file may be malicious, so the program is not going to read it."
,
file
=
sys
.
stderr
)
print
(
f
"You can skip this check with --disable-safe-unpickle commandline argument.
\n\n
"
,
file
=
sys
.
stderr
)
print
(
"
\n
The file may be malicious, so the program is not going to read it."
,
file
=
sys
.
stderr
)
print
(
"You can skip this check with --disable-safe-unpickle commandline argument.
\n\n
"
,
file
=
sys
.
stderr
)
return
None
return
unsafe_torch_load
(
filename
,
*
args
,
**
kwargs
)
...
...
modules/sd_models.py
浏览文件 @
b12de850
...
...
@@ -117,13 +117,13 @@ def select_checkpoint():
return
checkpoint_info
if
len
(
checkpoints_list
)
==
0
:
print
(
f
"No checkpoints found. When searching for checkpoints, looked at:"
,
file
=
sys
.
stderr
)
print
(
"No checkpoints found. When searching for checkpoints, looked at:"
,
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
)
print
(
"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
)
checkpoint_info
=
next
(
iter
(
checkpoints_list
.
values
()))
...
...
@@ -324,7 +324,7 @@ def load_model(checkpoint_info=None):
script_callbacks
.
model_loaded_callback
(
sd_model
)
print
(
f
"Model loaded."
)
print
(
"Model loaded."
)
return
sd_model
...
...
@@ -359,5 +359,5 @@ def reload_model_weights(sd_model=None, info=None):
if
not
shared
.
cmd_opts
.
lowvram
and
not
shared
.
cmd_opts
.
medvram
:
sd_model
.
to
(
devices
.
device
)
print
(
f
"Weights loaded."
)
print
(
"Weights loaded."
)
return
sd_model
modules/sd_vae.py
浏览文件 @
b12de850
...
...
@@ -208,5 +208,5 @@ def reload_vae_weights(sd_model=None, vae_file="auto"):
if
not
shared
.
cmd_opts
.
lowvram
and
not
shared
.
cmd_opts
.
medvram
:
sd_model
.
to
(
devices
.
device
)
print
(
f
"VAE Weights loaded."
)
print
(
"VAE Weights loaded."
)
return
sd_model
modules/textual_inversion/textual_inversion.py
浏览文件 @
b12de850
...
...
@@ -263,7 +263,7 @@ def train_embedding(embedding_name, learn_rate, batch_size, gradient_step, data_
initial_step
=
embedding
.
step
or
0
if
initial_step
>=
steps
:
shared
.
state
.
textinfo
=
f
"Model has already been trained beyond specified max steps"
shared
.
state
.
textinfo
=
"Model has already been trained beyond specified max steps"
return
embedding
,
filename
scheduler
=
LearnRateScheduler
(
learn_rate
,
steps
,
initial_step
)
...
...
scripts/prompts_from_file.py
浏览文件 @
b12de850
...
...
@@ -140,7 +140,7 @@ class Script(scripts.Script):
try
:
args
=
cmdargs
(
line
)
except
Exception
:
print
(
f
"Error parsing line
[line]
as commandline:"
,
file
=
sys
.
stderr
)
print
(
f
"Error parsing line
{
line
}
as commandline:"
,
file
=
sys
.
stderr
)
print
(
traceback
.
format_exc
(),
file
=
sys
.
stderr
)
args
=
{
"prompt"
:
line
}
else
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录