Skip to content

an extreremely minimalistic js library to extract PNG info from auto1111 gens

License

Notifications You must be signed in to change notification settings

thot-experiment/auto1111-pnginfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auto1111-pnginfo

an extreremely minimalistic js library to extract PNG info from auto1111 gens

it works on my machine, there's also a memory leak

details

this is an extremely simple library written to extract generation data from pngs generated by auto1111, it works both in the browser and in nodejs (probably deno too?)

as far as I can tell this works "correctly" with every PNG i've ever generated, and that's good enough for me

usage

import fs from 'fs/promises'
import PNGINFO from 'auto1111-pnginfo'

const file = await fs.readFile('generate_waifu.png')
const info = PNGINFO(file)

console.log(info)

notes

PNG Info is actually broken in auto1111, so this aims to be broken the same way. If you have a multi line prompt with the last line starting with Negative prompt: that will end up as the negative prompt in the generation, rather than part of the positive prompt. You can also put the Steps/Sampler etc into the negatives and get the same effect. I'm sure there are many other edge cases. Oh yeah also this probably doesn't work on a big endian arch.

About

an extreremely minimalistic js library to extract PNG info from auto1111 gens

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published