mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Merge pull request #5012 from Nandaka/master
Support NAI style exif in PNG Info for Send... buttons
This commit is contained in:
commit
488f831d52
@ -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\nNegative 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"""
|
||||||
|
Loading…
Reference in New Issue
Block a user