stable-diffusion.cpp icon indicating copy to clipboard operation
stable-diffusion.cpp copied to clipboard

Add ays, clip skip and vae, to image embedded params

Open one-lithe-rune opened this issue 1 year ago • 0 comments

Motivation

Since my own little frontend app reads the embedded parameter info from PNG images to display them ready for editing and generating again, I noticed that the Sampler tag includes 'karras' if you have set that scheduler, but doesn't include 'ays' if you have set that. Since 'ays' has been added recently I'm guessing this is unintentional?

Since I was already in there to fix that, I also added VAE and Clip Skip to be written if vae_path or clip_skip have been set, since those are also useful for my app.

Changes

  • If 'ays' is set as the scheduler include it in the 'Sampler' tag in the data embedded into the final image. This makes it the same as how Karras is handled
  • If a custom VAE path is set, include the vae name (without path and extension, using the same function as for Model) in embedded image params under a VAE: tag.
  • If a custom Clip skip is set, include that Clip skip value in embedded image params under a Clip skip: tag.

one-lithe-rune avatar Jul 30 '24 12:07 one-lithe-rune