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
d7bcc942
Unverified
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
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:
...
@@ -580,9 +580,8 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
if
shared
.
opts
.
live_previews_enable
and
opts
.
show_progress_type
==
"Approx NN"
:
if
shared
.
opts
.
live_previews_enable
and
opts
.
show_progress_type
==
"Approx NN"
:
sd_vae_approx
.
model
()
sd_vae_approx
.
model
()
with
open
(
os
.
path
.
join
(
paths
.
data_path
,
"params.txt"
),
"w"
,
encoding
=
"utf8"
)
as
file
:
if
not
p
.
disable_extra_networks
:
processed
=
Processed
(
p
,
[],
p
.
seed
,
""
)
extra_networks
.
activate
(
p
,
extra_network_data
)
file
.
write
(
processed
.
infotext
(
p
,
0
))
if
state
.
job_count
==
-
1
:
if
state
.
job_count
==
-
1
:
state
.
job_count
=
p
.
n_iter
state
.
job_count
=
p
.
n_iter
...
@@ -613,6 +612,15 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
...
@@ -613,6 +612,15 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
if
p
.
scripts
is
not
None
:
if
p
.
scripts
is
not
None
:
p
.
scripts
.
process_batch
(
p
,
batch_number
=
n
,
prompts
=
prompts
,
seeds
=
seeds
,
subseeds
=
subseeds
)
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
)
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
)
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