-
Notifications
You must be signed in to change notification settings - Fork 239
weighed combination and combined stats, in shorter list and several fixes and updates to the ui #93
Conversation
add comma's to tags if appending inserting to previous tags
some that we're missing, but the list is not overly long
…rather than appending
loop once the key-value key seems deliberate, but is only present with weights remove extra comma
makes less sense, because the average cannot be calculated anyway. besides, this allows a 'conclusion' step after consecutive interrogations where the last removes the ict. This also should fix the combination of weighted and non-weighted. also the extra comma was not fixed, this should do it then. only print once per file, about missing weights
all tags files. the first exclusion tag may be a regexp, in /regexp/ format.
In my last 2 patches I add a search/replace tag. It works but you have to manually enter, and I'd like to add the click from tag confidents capability that exclusion and additional tags input fields again have (after 656f03b). I have the javascript edits and those seem to work, you can click and the the words appear, however, when you submit nothing is actually submitted, unless you edit the search and replace input fields manually (that seem to work, or do they?) This seems a javascript issue but it confuses me. I've set it up almost exactly like the exclusion and additional tags input fields. but somehow it does not work. I've tried removing the row, that doesn't seem to be it. Any ideas? the javascript/tagger.js change would be: @@ -43,34 +43,40 @@ function waitQuerySelector(selector, timeout = 5000, $rootElement = gradioApp())
document.addEventListener('DOMContentLoaded', () => {
Promise.all([
// option texts
waitQuerySelector('#additioanl-tags'),
waitQuerySelector('#exclude-tags'),
+ waitQuerySelector('#search-tags'),
+ waitQuerySelector('#replace-tags'),
// tag-confident labels
waitQuerySelector('#rating-confidents'),
waitQuerySelector('#tag-confidents')
]).then(elements => {
- const $additionalTags = elements[0].querySelector('textarea')
- const $excludeTags = elements[1].querySelector('textarea')
- const $ratingConfidents = elements[2]
- const $tagConfidents = elements[3]
+ const $additionalTags = elements[0].querySelector('textarea');
+ const $excludeTags = elements[1].querySelector('textarea');
+ const $searchTags = elements[2].querySelector('textarea');
+ const $replaceTags = elements[3].querySelector('textarea');
+ const $ratingConfidents = elements[4];
+ const $tagConfidents = elements[5];
- let $selectedTextarea = $additionalTags
+ let $selectedTextarea = $additionalTags;
/**
* @this {HTMLElement}
* @param {MouseEvent} e
* @listens document#click
*/
function onClickTextarea(e) {
- $selectedTextarea = this
+ $selectedTextarea = this;
}
- $additionalTags.addEventListener('click', onClickTextarea)
- $excludeTags.addEventListener('click', onClickTextarea)
+ $additionalTags.addEventListener('click', onClickTextarea);
+ $excludeTags.addEventListener('click', onClickTextarea);
+ $searchTags.addEventListener('click', onClickTextarea);
+ $replaceTags.addEventListener('click', onClickTextarea);
/**
* @this {HTMLElement}
* @param {MouseEvent} e
* @listens document#click |
To answer my own question, it wasn't actually working for your implemented textarea's either. It only seemed that way since I had always manually filled in those. What was missing was an input event, see: |
Hi @picobyte, |
Hello, may I ask if it is possible to modify the model download path, |
The model will be automatically downloaded to the stable differentiation webui models intermediaries folder |
I'm in the process of making more changes, but it is not finished yet. I'll push it to my master once I have a working version that at least passes current functionality. Until that time there is what I had so far before I started with the bigger changes: What I have so far: In the long run, after a batch query. I'd like to be able to select a tag and order the images as thumbnails according to the weight for that tag, a bit like the kitchen thumbs. And also after several interrogations, which interrogations on average weigh that tag how much to the images. To get an impression of how effective an interrogation was. current issue: |
@picobyte |
Latest changes on https://github.com/picobyte/stable-diffusion-webui-wd14-tagger/tree/master It seems to work for image and @wzgrx I implemented something like Elziy mentioned, was that what you meant? |
@picobyte |
@a-l-e-x-d-s-9 what should already be helpful for large batch queries is that a query now writes a db.json with raw query results (actually any weight above 0.005) in the outputs file after query. If you change the parameters for writing the tags files, it rereads this file, then filters and writes the tags file. For large queries this json could be updated per n files, so there could be a 'preview', tweak the filter settings while the batch query is running. Currently image sha256 + interrogator name are the keys. Any file that is changed (or for a different kind of interrogation) is re-queried and included. For large batches it might be better just to rely on filename, maybe plus modification time, and skip the sha256 checksums, It could be a key format in the settings, a bit similar to the tags file format. |
There are always omissions when labeling, which is why, when 100 images are labeled in bulk, sometimes 50 txt tags appear, while the other 50 images do not have txt tags. This often happens |
For example, 1. png and 1. jpg, two images, one of which cannot be labeled |
The file with the tags is called |
@wzgrx: In the formatting field or in my master branch, In the settings tab; tagger section, you can add .[extension], in between the others, make sure you leave the last one though, or you will overwrite your images with your tags file |
I've added a version v1.0.0 release, seems to work, finally. I've sent an update to the extensions repository. Thanks for all the suggestions. |
Credits for Toriato for his work, but his extension has been inactive, with some issues. I had a pull request for a while, and it has been growing, to the extent that some suggested me to just create a main branch and present it here. See my last reease notes here: https://github.com/picobyte/stable-diffusion-webui-wd14-tagger/releases And the discussion: toriato/stable-diffusion-webui-wd14-tagger#93
General:
6bb0114 the clicked value is actually stored.
For batch processing:
excludes tags
option #29.to linearly decline, in order of listing, from 1 to 0 in equal steps for the number of tags, and a prior interrogation counter of 1 is assumed, that is used to correct the added weights. A warning is printed.