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
488f831d
Unverified
Commit
488f831d
authored
Nov 27, 2022
by
AUTOMATIC1111
Committed by
GitHub
Nov 27, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5012 from Nandaka/master
Support NAI style exif in PNG Info for Send... buttons
parents
9ec0a41a
904121fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
extras.py
modules/extras.py
+14
-0
No files found.
modules/extras.py
View file @
488f831d
...
@@ -234,6 +234,20 @@ def run_pnginfo(image):
...
@@ -234,6 +234,20 @@ def run_pnginfo(image):
geninfo
=
items
.
get
(
'parameters'
,
geninfo
)
geninfo
=
items
.
get
(
'parameters'
,
geninfo
)
# nai prompt
if
"Software"
in
items
.
keys
()
and
items
[
"Software"
]
==
"NovelAI"
:
import
json
json_info
=
json
.
loads
(
items
[
"Comment"
])
geninfo
=
f
'{items["Description"]}
\r\n
Negative prompt: {json_info["uc"]}
\r\n
'
sampler
=
"Euler a"
if
json_info
[
"sampler"
]
==
"k_euler_ancestral"
:
sampler
=
"Euler a"
elif
json_info
[
"sampler"
]
==
"k_euler"
:
sampler
=
"Euler"
model_hash
=
'925997e9'
# assuming this is the correct model hash
# not sure with noise and strength parameter
geninfo
+=
f
'Steps: {json_info["steps"]}, Sampler: {sampler}, CFG scale: {json_info["scale"]}, Seed: {json_info["seed"]}, Size: {image.width}x{image.height}, Model hash: {model_hash}'
# , Denoising strength: {json_info["noise"]}'
info
=
''
info
=
''
for
key
,
text
in
items
.
items
():
for
key
,
text
in
items
.
items
():
info
+=
f
"""
info
+=
f
"""
...
...
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