d8ahazard / sd_smartprocess

Smart Pre-processing extension for Stable Diffusion
194 stars 19 forks source link

Suggestions: Add tooltips #13

Open Zyin055 opened 1 year ago

Zyin055 commented 1 year ago

It would be nice if there were tooltips or explanations of what each of the checkboxes does, especially in the Captions tab.

For example: "Use v2 CLIP Model" - describe how v2 is better than whatever the other option is "Append Flavor tags from CLIP" - describe what a Flavor tag is "Append Medium tags from CLIP" - describe what a Medium tag is "Append Movement tags from CLIP" - describe what a Movement tag is "Append Arist tags from CLIP" - what data set of artists does it know of? anime, real life, etc. "Append Trending tags from CLIP" - describe what a Trending tag is "Add WD14 tags" - describe what a WD14/DeepDanbooru are

Tooltips can easily be added to your elements in your javascript file. I use this code to add them to my extension:

onUiUpdate(function() {
    //set tooltips
    gradioApp().querySelectorAll("#config_presets_open_config_file_button").forEach(el => el.setAttribute("title", "[Config Presets] open config.json, requires Gradio restart after editing"))
})