feat: add missing models and parameters to image metadata (#743)

* feat: add new scheduler types, clip skip and vae to image embedded params

- If a non default scheduler is set, include it in the 'Sampler' tag in the data
embedded into the final image.
- If a custom VAE path is set, include the vae name (without path and extension)
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.

* feat: add separate diffusion and text models to metadata

---------

Co-authored-by: one-lithe-rune <skapusniak@lithe-runes.com>
This commit is contained in:
Wagner Bruna 2025-07-28 11:00:27 -03:00 committed by GitHub
parent 59080d3ce1
commit 7eb30d00e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -677,10 +677,24 @@ std::string get_image_params(SDParams params, int64_t seed) {
parameter_string += "Model: " + sd_basename(params.model_path) + ", ";
parameter_string += "RNG: " + std::string(sd_rng_type_name(params.rng_type)) + ", ";
parameter_string += "Sampler: " + std::string(sd_sample_method_name(params.sample_method));
if (params.schedule == KARRAS) {
parameter_string += " karras";
if (params.schedule != DEFAULT) {
parameter_string += " " + std::string(sd_schedule_name(params.schedule));
}
parameter_string += ", ";
for (const auto& te : {params.clip_l_path, params.clip_g_path, params.t5xxl_path}) {
if (!te.empty()) {
parameter_string += "TE: " + sd_basename(te) + ", ";
}
}
if (!params.diffusion_model_path.empty()) {
parameter_string += "Unet: " + sd_basename(params.diffusion_model_path) + ", ";
}
if (!params.vae_path.empty()) {
parameter_string += "VAE: " + sd_basename(params.vae_path) + ", ";
}
if (params.clip_skip != -1) {
parameter_string += "Clip skip: " + std::to_string(params.clip_skip) + ", ";
}
parameter_string += "Version: stable-diffusion.cpp";
return parameter_string;
}