huchenlei / sd-webui-api-payload-display

Display the corresponding API payload after each generation on WebUI
MIT License
193 stars 19 forks source link

Model Name and Hash #15

Open FabianSchuetze opened 8 months ago

FabianSchuetze commented 8 months ago

Thanks for this wonderful extension!

Does the json contain the model name and hash, such as Model hash: 15012c538f, Model: realisticVisionV51_v51VAE I cannot find it and wonder how it both variables are set.

ellypaws commented 7 months ago

It would be nice to have this added. In particular, this can be set in the override_settings, which uses the options schema, which is essentially the config.

So the of override_settings can potentially be populated by querying /sdapi/v1/options

In particular, the fields for model hash is sd_checkpoint_hash and model name is sd_model_checkpoint

In addition, this would fill out the details for VAE, Clip skip, Token merge ratio, and in > 1.8.0 use_downcasted_alpha_bar aka DowncastAlphasCumprodToFP16

A sample json object would look like as follows

{
  "batch_size": 1,
  "cfg_scale": 7,
  "height": 512,
  "hr_second_pass_steps": 20,
  "hr_upscaler": "Latent",
  "negative_prompt": "EasyNegative",
  "override_settings": {
    "sd_model_checkpoint": "realisticVisionV51_v51VAE",
    "sd_checkpoint_hash": "15012c538f"
  },
  "override_settings_restore_afterwards": true,
  "prompt": "prompt",
  "sampler_name": "Euler a",
  "seed": -1,
  "steps": 20,
  "width": 512
}
ellypaws commented 7 months ago

A related commit was made that sort of does the above by @yudi-xiao

https://github.com/yudi-xiao/sd-webui-api-payload-display/commit/32981aa64de4238ab0911d6121aa20cc22c5e322