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
a655e90f
Commit
a655e90f
authored
Sep 12, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add negative prompt to log when clicking save #249
parent
45e8fa0e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
modules/processing.py
modules/processing.py
+2
-0
modules/ui.py
modules/ui.py
+2
-2
No files found.
modules/processing.py
View file @
a655e90f
...
...
@@ -65,6 +65,7 @@ class Processed:
def
__init__
(
self
,
p
:
StableDiffusionProcessing
,
images_list
,
seed
,
info
):
self
.
images
=
images_list
self
.
prompt
=
p
.
prompt
self
.
negative_prompt
=
p
.
negative_prompt
self
.
seed
=
seed
self
.
info
=
info
self
.
width
=
p
.
width
...
...
@@ -76,6 +77,7 @@ class Processed:
def
js
(
self
):
obj
=
{
"prompt"
:
self
.
prompt
if
type
(
self
.
prompt
)
!=
list
else
self
.
prompt
[
0
],
"negative_prompt"
:
self
.
negative_prompt
if
type
(
self
.
negative_prompt
)
!=
list
else
self
.
negative_prompt
[
0
],
"seed"
:
int
(
self
.
seed
if
type
(
self
.
seed
)
!=
list
else
self
.
seed
[
0
]),
"width"
:
self
.
width
,
"height"
:
self
.
height
,
...
...
modules/ui.py
View file @
a655e90f
...
...
@@ -93,7 +93,7 @@ def save_files(js_data, images):
at_start
=
file
.
tell
()
==
0
writer
=
csv
.
writer
(
file
)
if
at_start
:
writer
.
writerow
([
"prompt"
,
"seed"
,
"width"
,
"height"
,
"sampler"
,
"cfgs"
,
"steps"
,
"filename"
])
writer
.
writerow
([
"prompt"
,
"seed"
,
"width"
,
"height"
,
"sampler"
,
"cfgs"
,
"steps"
,
"filename"
,
"negative_prompt"
])
filename_base
=
str
(
int
(
time
.
time
()
*
1000
))
for
i
,
filedata
in
enumerate
(
images
):
...
...
@@ -108,7 +108,7 @@ def save_files(js_data, images):
filenames
.
append
(
filename
)
writer
.
writerow
([
data
[
"prompt"
],
data
[
"seed"
],
data
[
"width"
],
data
[
"height"
],
data
[
"sampler"
],
data
[
"cfg_scale"
],
data
[
"steps"
],
filenames
[
0
]])
writer
.
writerow
([
data
[
"prompt"
],
data
[
"seed"
],
data
[
"width"
],
data
[
"height"
],
data
[
"sampler"
],
data
[
"cfg_scale"
],
data
[
"steps"
],
filenames
[
0
]
,
data
[
"negative_prompt"
]
])
return
''
,
''
,
plaintext_to_html
(
f
"Saved: {filenames[0]}"
)
...
...
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