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
141d4b71
Commit
141d4b71
authored
Jul 20, 2024
by
AUTOMATIC1111
Committed by
GitHub
Jul 20, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16242 from AUTOMATIC1111/option-to-disable-save-button-log.csv-
option to disable save button log.csv
parents
ea903819
24a23e12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
modules/shared_options.py
modules/shared_options.py
+1
-0
modules/ui_common.py
modules/ui_common.py
+10
-7
No files found.
modules/shared_options.py
View file @
141d4b71
...
@@ -64,6 +64,7 @@ options_templates.update(options_section(('saving-images', "Saving images/grids"
...
@@ -64,6 +64,7 @@ options_templates.update(options_section(('saving-images', "Saving images/grids"
"use_original_name_batch"
:
OptionInfo
(
True
,
"Use original name for output filename during batch process in extras tab"
),
"use_original_name_batch"
:
OptionInfo
(
True
,
"Use original name for output filename during batch process in extras tab"
),
"use_upscaler_name_as_suffix"
:
OptionInfo
(
False
,
"Use upscaler name as filename suffix in the extras tab"
),
"use_upscaler_name_as_suffix"
:
OptionInfo
(
False
,
"Use upscaler name as filename suffix in the extras tab"
),
"save_selected_only"
:
OptionInfo
(
True
,
"When using 'Save' button, only save a single selected image"
),
"save_selected_only"
:
OptionInfo
(
True
,
"When using 'Save' button, only save a single selected image"
),
"save_write_log_csv"
:
OptionInfo
(
True
,
"Write log.csv when saving images using 'Save' button"
),
"save_init_img"
:
OptionInfo
(
False
,
"Save init images when using img2img"
),
"save_init_img"
:
OptionInfo
(
False
,
"Save init images when using img2img"
),
"temp_dir"
:
OptionInfo
(
""
,
"Directory for temporary images; leave empty for default"
),
"temp_dir"
:
OptionInfo
(
""
,
"Directory for temporary images; leave empty for default"
),
...
...
modules/ui_common.py
View file @
141d4b71
...
@@ -3,6 +3,7 @@ import dataclasses
...
@@ -3,6 +3,7 @@ import dataclasses
import
json
import
json
import
html
import
html
import
os
import
os
from
contextlib
import
nullcontext
import
gradio
as
gr
import
gradio
as
gr
...
@@ -103,14 +104,15 @@ def save_files(js_data, images, do_make_zip, index):
...
@@ -103,14 +104,15 @@ def save_files(js_data, images, do_make_zip, index):
# NOTE: ensure csv integrity when fields are added by
# NOTE: ensure csv integrity when fields are added by
# updating headers and padding with delimiters where needed
# updating headers and padding with delimiters where needed
if
os
.
path
.
exists
(
logfile_path
):
if
shared
.
opts
.
save_write_log_csv
and
os
.
path
.
exists
(
logfile_path
):
update_logfile
(
logfile_path
,
fields
)
update_logfile
(
logfile_path
,
fields
)
with
open
(
logfile_path
,
"a"
,
encoding
=
"utf8"
,
newline
=
''
)
as
file
:
with
(
open
(
logfile_path
,
"a"
,
encoding
=
"utf8"
,
newline
=
''
)
if
shared
.
opts
.
save_write_log_csv
else
nullcontext
())
as
file
:
at_start
=
file
.
tell
()
==
0
if
file
:
writer
=
csv
.
writer
(
file
)
at_start
=
file
.
tell
()
==
0
if
at_start
:
writer
=
csv
.
writer
(
file
)
writer
.
writerow
(
fields
)
if
at_start
:
writer
.
writerow
(
fields
)
for
image_index
,
filedata
in
enumerate
(
images
,
start_index
):
for
image_index
,
filedata
in
enumerate
(
images
,
start_index
):
image
=
image_from_url_text
(
filedata
)
image
=
image_from_url_text
(
filedata
)
...
@@ -130,7 +132,8 @@ def save_files(js_data, images, do_make_zip, index):
...
@@ -130,7 +132,8 @@ def save_files(js_data, images, do_make_zip, index):
filenames
.
append
(
os
.
path
.
basename
(
txt_fullfn
))
filenames
.
append
(
os
.
path
.
basename
(
txt_fullfn
))
fullfns
.
append
(
txt_fullfn
)
fullfns
.
append
(
txt_fullfn
)
writer
.
writerow
([
parsed_infotexts
[
0
][
'Prompt'
],
parsed_infotexts
[
0
][
'Seed'
],
data
[
"width"
],
data
[
"height"
],
data
[
"sampler_name"
],
data
[
"cfg_scale"
],
data
[
"steps"
],
filenames
[
0
],
parsed_infotexts
[
0
][
'Negative prompt'
],
data
[
"sd_model_name"
],
data
[
"sd_model_hash"
]])
if
file
:
writer
.
writerow
([
parsed_infotexts
[
0
][
'Prompt'
],
parsed_infotexts
[
0
][
'Seed'
],
data
[
"width"
],
data
[
"height"
],
data
[
"sampler_name"
],
data
[
"cfg_scale"
],
data
[
"steps"
],
filenames
[
0
],
parsed_infotexts
[
0
][
'Negative prompt'
],
data
[
"sd_model_name"
],
data
[
"sd_model_hash"
]])
# Make Zip
# Make Zip
if
do_make_zip
:
if
do_make_zip
:
...
...
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