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
75fde6bc
Unverified
Commit
75fde6bc
authored
Sep 02, 2022
by
deggua
Committed by
GitHub
Sep 02, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into automatic_master
parents
4e2cc78e
7ec7a3b1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
webui.py
webui.py
+13
-13
No files found.
webui.py
View file @
75fde6bc
...
...
@@ -404,7 +404,7 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
os
.
makedirs
(
path
,
exist_ok
=
True
)
filecount
=
len
(
os
.
listdir
(
path
)
)
filecount
=
len
(
[
x
for
x
in
os
.
listdir
(
path
)
if
os
.
path
.
splitext
(
x
)[
1
]
==
'.'
+
extension
]
)
fullfn
=
"a.png"
fullfn_without_extension
=
"a"
for
i
in
range
(
100
):
...
...
@@ -1126,11 +1126,12 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
all_prompts
=
p
.
batch_size
*
p
.
n_iter
*
[
prompt
]
all_seeds
=
[
seed
+
x
for
x
in
range
(
len
(
all_prompts
))]
def
infotext
(
iteration
=
0
,
position_in_batch
=
0
):
generation_params
=
{
"Steps"
:
p
.
steps
,
"Sampler"
:
samplers
[
p
.
sampler_index
]
.
name
,
"CFG scale"
:
p
.
cfg_scale
,
"Seed"
:
seed
,
"Seed"
:
all_seeds
[
position_in_batch
+
iteration
*
p
.
batch_size
]
,
"GFPGAN"
:
(
"GFPGAN"
if
p
.
use_GFPGAN
else
None
)
}
...
...
@@ -1139,7 +1140,6 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
generation_params_text
=
", "
.
join
([
k
if
k
==
v
else
f
'{k}: {v}'
for
k
,
v
in
generation_params
.
items
()
if
v
is
not
None
])
def
infotext
():
return
f
"{prompt}
\n
{generation_params_text}"
.
strip
()
+
""
.
join
([
"
\n\n
"
+
x
for
x
in
comments
])
if
os
.
path
.
exists
(
cmd_opts
.
embeddings_dir
):
...
...
@@ -1202,7 +1202,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
image
=
image
.
convert
(
'RGB'
)
if
opts
.
samples_save
and
not
p
.
do_not_save_samples
:
save_image
(
image
,
p
.
outpath_samples
,
""
,
seeds
[
i
],
prompts
[
i
],
opts
.
samples_format
,
info
=
infotext
())
save_image
(
image
,
p
.
outpath_samples
,
""
,
seeds
[
i
],
prompts
[
i
],
opts
.
samples_format
,
info
=
infotext
(
n
,
i
))
output_images
.
append
(
image
)
...
...
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