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
7c22bbd3
Commit
7c22bbd3
authored
Jul 26, 2023
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attempt 2
parent
13e371af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
modules/processing.py
modules/processing.py
+16
-12
No files found.
modules/processing.py
View file @
7c22bbd3
...
@@ -621,12 +621,12 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
...
@@ -621,12 +621,12 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
"Sampler"
:
p
.
sampler_name
,
"Sampler"
:
p
.
sampler_name
,
"CFG scale"
:
p
.
cfg_scale
,
"CFG scale"
:
p
.
cfg_scale
,
"Image CFG scale"
:
getattr
(
p
,
'image_cfg_scale'
,
None
),
"Image CFG scale"
:
getattr
(
p
,
'image_cfg_scale'
,
None
),
"Seed"
:
all_seeds
[
index
],
"Seed"
:
p
.
all_seeds
[
0
]
if
use_main_prompt
else
all_seeds
[
index
],
"Face restoration"
:
(
opts
.
face_restoration_model
if
p
.
restore_faces
else
None
),
"Face restoration"
:
(
opts
.
face_restoration_model
if
p
.
restore_faces
else
None
),
"Size"
:
f
"{p.width}x{p.height}"
,
"Size"
:
f
"{p.width}x{p.height}"
,
"Model hash"
:
getattr
(
p
,
'sd_model_hash'
,
None
if
not
opts
.
add_model_hash_to_info
or
not
shared
.
sd_model
.
sd_model_hash
else
shared
.
sd_model
.
sd_model_hash
),
"Model hash"
:
getattr
(
p
,
'sd_model_hash'
,
None
if
not
opts
.
add_model_hash_to_info
or
not
shared
.
sd_model
.
sd_model_hash
else
shared
.
sd_model
.
sd_model_hash
),
"Model"
:
(
None
if
not
opts
.
add_model_name_to_info
else
shared
.
sd_model
.
sd_checkpoint_info
.
name_for_extra
),
"Model"
:
(
None
if
not
opts
.
add_model_name_to_info
else
shared
.
sd_model
.
sd_checkpoint_info
.
name_for_extra
),
"Variation seed"
:
(
None
if
p
.
subseed_strength
==
0
else
all_subseeds
[
index
]
),
"Variation seed"
:
(
None
if
p
.
subseed_strength
==
0
else
(
p
.
all_subseeds
[
0
]
if
use_main_prompt
else
all_subseeds
[
index
])
),
"Variation seed strength"
:
(
None
if
p
.
subseed_strength
==
0
else
p
.
subseed_strength
),
"Variation seed strength"
:
(
None
if
p
.
subseed_strength
==
0
else
p
.
subseed_strength
),
"Seed resize from"
:
(
None
if
p
.
seed_resize_from_w
<=
0
or
p
.
seed_resize_from_h
<=
0
else
f
"{p.seed_resize_from_w}x{p.seed_resize_from_h}"
),
"Seed resize from"
:
(
None
if
p
.
seed_resize_from_w
<=
0
or
p
.
seed_resize_from_h
<=
0
else
f
"{p.seed_resize_from_w}x{p.seed_resize_from_h}"
),
"Denoising strength"
:
getattr
(
p
,
'denoising_strength'
,
None
),
"Denoising strength"
:
getattr
(
p
,
'denoising_strength'
,
None
),
...
@@ -807,20 +807,24 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
...
@@ -807,20 +807,24 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
if
p
.
scripts
is
not
None
:
if
p
.
scripts
is
not
None
:
p
.
scripts
.
postprocess_batch
(
p
,
x_samples_ddim
,
batch_number
=
n
)
p
.
scripts
.
postprocess_batch
(
p
,
x_samples_ddim
,
batch_number
=
n
)
batch_params
=
scripts
.
PostprocessBatchListArgs
(
batch_params
=
scripts
.
PostprocessBatchListArgs
(
list
(
x_samples_ddim
),
list
(
x_samples_ddim
),
p
.
all_prompts
[
n
*
p
.
batch_size
:(
n
+
1
)
*
p
.
batch_size
],
p
.
all_prompts
[
n
*
p
.
batch_size
:(
n
+
1
)
*
p
.
batch_size
],
p
.
all_negative_prompts
[
n
*
p
.
batch_size
:(
n
+
1
)
*
p
.
batch_size
],
p
.
all_negative_prompts
[
n
*
p
.
batch_size
:(
n
+
1
)
*
p
.
batch_size
],
p
.
seeds
,
p
.
seeds
,
p
.
subseeds
,
p
.
subseeds
,
)
)
if
p
.
scripts
is
not
None
:
p
.
scripts
.
postprocess_batch_list
(
p
,
batch_params
,
batch_number
=
n
)
p
.
scripts
.
postprocess_batch_list
(
p
,
batch_params
,
batch_number
=
n
)
x_samples_ddim
=
batch_params
.
images
x_samples_ddim
=
batch_params
.
images
p
.
prompts
=
batch_params
.
prompts
p
.
negative_prompts
=
batch_params
.
negative_prompts
p
.
seeds
=
batch_params
.
seeds
p
.
subseeds
=
batch_params
.
subseeds
def
infotext
(
index
=
0
,
use_main_prompt
=
False
):
def
infotext
(
index
=
0
,
use_main_prompt
=
False
):
return
create_infotext
(
p
,
batch_params
.
prompts
,
batch_params
.
seeds
,
batch_params
.
subseeds
,
use_main_prompt
=
use_main_prompt
,
index
=
index
,
all_negative_prompts
=
batch_params
.
negative_prompts
)
return
create_infotext
(
p
,
p
.
prompts
,
p
.
seeds
,
p
.
subseeds
,
use_main_prompt
=
use_main_prompt
,
index
=
index
,
all_negative_prompts
=
p
.
negative_prompts
)
for
i
,
x_sample
in
enumerate
(
x_samples_ddim
):
for
i
,
x_sample
in
enumerate
(
x_samples_ddim
):
p
.
batch_index
=
i
p
.
batch_index
=
i
...
@@ -910,7 +914,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
...
@@ -910,7 +914,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
p
,
p
,
images_list
=
output_images
,
images_list
=
output_images
,
seed
=
p
.
all_seeds
[
0
],
seed
=
p
.
all_seeds
[
0
],
info
=
infotext
()
,
info
=
infotext
s
[
0
]
,
comments
=
""
.
join
(
f
"{comment}
\n
"
for
comment
in
comments
),
comments
=
""
.
join
(
f
"{comment}
\n
"
for
comment
in
comments
),
subseed
=
p
.
all_subseeds
[
0
],
subseed
=
p
.
all_subseeds
[
0
],
index_of_first_image
=
index_of_first_image
,
index_of_first_image
=
index_of_first_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