stable diffusionで生成した画像のpromptを確認したくなることが多いです。

 

stable diffusionにはPNGINFO機能が搭載されており、promptを確認することはできますが、stable diffusionを起動するまでもなく、簡単にぱぱっとpromptを確認出来たら便利です。

 

pngファイルテキスト情報としてpromptが格納されているわけですが、それを引っ張り出して表示するという原理は単純なもので良いはず。

 

というわけでこの度簡易pnginfoツールを開発しました。

 

 

画面左上部に移っているpythonのアイコンにpromptを確認したいpngファイルをドラッグアンドドロップすることで画面のようにpromptが表示されるという仕組みです。

 

以下promptの一例です。

parameters: Daniela from Ecuador, short spiky hairstyle [bronze:.3] hair, highres, masterpiece, perfect ligthing, bloom, cinematic lighting, adult, perfect skin, female, (looking at camera:1.55), realistic skin,realistic, (photorealistic:1.3), woman, soft light, perfect face, ray tracing,extremely detailed cg, High quality shadow, a realistic representation of the face, Detailed beautiful delicate face, Detailed beautiful delicate eyes, extremely detailed skin texture, tan,
big light eyes, slender, slim, ((narrow waist)),
eyeliner, red lips, small breasts,
beautiful eyes,
dressed, cleavage,
(air hostess uniform), (hair up:1.2), <lora:sd15_lcm:1>
Negative prompt: bad-hands-5, (bad-picture-chill-75v:0.8), bad_prompt_version2, easynegative, ng_deepnegative_v1_75t, (worst quality), (big breasts), bad mouth, bad tongue, bad arms, extra arms,  badhandv4, EasyNegative, bad eyes, extra limbs, bad anatomy, morphed, line art, amateur, flat, sketch,  watermark,big breasts, ear rings, selfie,purse,korean, asian,
Steps: 8, Sampler: Euler a, CFG scale: 2, Seed: 2960326625, Size: 512x640, Model hash: e3020b4e49, Model: realisian_v50, VAE hash: 735e4c3a44, VAE: vae-ft-mse-840000-ema-pruned.safetensors, Denoising strength: 0.4, CloneCleaner enabled: True, CC_gender: female, CC_insert_start: True, CC_declone_weight: 1, CC_use_main_seed: True, CC_declone_seed: 2960326618, Hires prompt: "highres, masterpiece, perfect ligthing, bloom, cinematic lighting, adult, perfect skin, female, (looking at camera:1.55), realistic skin,realistic, (photorealistic:1.3), woman, soft light, perfect face, ray tracing,extremely detailed cg, High quality shadow, a realistic representation of the face, Detailed beautiful delicate face, Detailed beautiful delicate eyes, extremely detailed skin texture, tan,\nbig light eyes, slender, slim, ((narrow waist)),\neyeliner, red lips, small breasts,\nbeautiful eyes,\ndressed, cleavage,\n(air hostess uniform), (hair up:1.2), <lora:sd15_lcm:1>", Hires upscale: 2, Hires steps: 12, Hires upscaler: Latent, Lora hashes: "sd15_lcm: aaebf6360f7d", TI hashes: "EasyNegative: c74b4e810b03, badhandv4: 5e40d722fc3d", Version: v1.6.0

 

Copy to Clipboardボタンも搭載しておりますので、容易にpromptをコピーして活用できます。

 

因みに、私はAPIを使ってstable diffusionのWebUIを制御したりすることも多いため、API用のプログラムを書く時にもこのツールは役に立ちそうです。

※もっとグラフィカルで良いpnginfoツールが存在することも存じておりましたが、私の普段使いのPCにインストールされているESET(セキュリティツール)でウィルスとして認識され、勝手に消されてしまう状況に見舞われました。なので、それならば自作で、という背景もありました。

なお、ESETではそのような反応をしますが、windows標準のセキュリティではそういったことは起こりません。