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
d7bcc942
Commit
d7bcc942
authored
Feb 19, 2023
by
AUTOMATIC1111
Committed by
GitHub
Feb 19, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7868 from space-nuko/fix-save-params-2
Fix params.txt saving for infotexts modified by process_batch
parents
75e03785
6911deb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
modules/processing.py
modules/processing.py
+11
-3
No files found.
modules/processing.py
View file @
d7bcc942
...
...
@@ -580,9 +580,8 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
if
shared
.
opts
.
live_previews_enable
and
opts
.
show_progress_type
==
"Approx NN"
:
sd_vae_approx
.
model
()
with
open
(
os
.
path
.
join
(
paths
.
data_path
,
"params.txt"
),
"w"
,
encoding
=
"utf8"
)
as
file
:
processed
=
Processed
(
p
,
[],
p
.
seed
,
""
)
file
.
write
(
processed
.
infotext
(
p
,
0
))
if
not
p
.
disable_extra_networks
:
extra_networks
.
activate
(
p
,
extra_network_data
)
if
state
.
job_count
==
-
1
:
state
.
job_count
=
p
.
n_iter
...
...
@@ -613,6 +612,15 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
if
p
.
scripts
is
not
None
:
p
.
scripts
.
process_batch
(
p
,
batch_number
=
n
,
prompts
=
prompts
,
seeds
=
seeds
,
subseeds
=
subseeds
)
# params.txt should be saved after scripts.process_batch, since the
# infotext could be modified by that callback
# Example: a wildcard processed by process_batch sets an extra model
# strength, which is saved as "Model Strength: 1.0" in the infotext
if
n
==
0
:
with
open
(
os
.
path
.
join
(
paths
.
data_path
,
"params.txt"
),
"w"
,
encoding
=
"utf8"
)
as
file
:
processed
=
Processed
(
p
,
[],
p
.
seed
,
""
)
file
.
write
(
processed
.
infotext
(
p
,
0
))
uc
=
get_conds_with_caching
(
prompt_parser
.
get_learned_conditioning
,
negative_prompts
,
p
.
steps
,
cached_uc
)
c
=
get_conds_with_caching
(
prompt_parser
.
get_multicond_learned_conditioning
,
prompts
,
p
.
steps
,
cached_c
)
...
...
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