Feature-rich UI tab that allows image viewing, search-filtering and editing.
 
 
 
Go to file
toshiaki1729 f7d29328b5 Squashed commit of the following:
commit 106b43466a15f9eca6241eedf77fd4a414f5a148
Author: toshiaki1729 <116595002+toshiaki1729@users.noreply.github.com>
Date:   Sun Dec 11 18:15:12 2022 +0900

    add method to score manually

commit 1b1d94f7879c73fce259ee8ad3c7bd34023b19ac
Author: toshiaki1729 <116595002+toshiaki1729@users.noreply.github.com>
Date:   Sun Dec 11 18:06:11 2022 +0900

    save tag scores on loading

commit 2abade6c4925c0797bad21fdfaa6b9bb4a1f1486
Author: toshiaki1729 <116595002+toshiaki1729@users.noreply.github.com>
Date:   Sun Dec 11 17:57:16 2022 +0900

    fix wrong params, wrong clip

commit 4ca3da6a47d951979e70079eefcc032512813cc5
Author: toshiaki1729 <116595002+toshiaki1729@users.noreply.github.com>
Date:   Sun Dec 11 17:46:17 2022 +0900

    allow using wdv1.4 tagger when loading

    #21

commit 3df922552e503612826300e44ff25da4df260b0a
Author: toshiaki1729 <116595002+toshiaki1729@users.noreply.github.com>
Date:   Sun Dec 11 16:32:28 2022 +0900

    implement wdv1.4 tagger (on the way)

    wdv1.4 tagger now available only in selected image

commit e4062bb79f31543bbe675e2e119e346b26efcb0c
Author: toshiaki1729 <116595002+toshiaki1729@users.noreply.github.com>
Date:   Sun Dec 11 16:07:18 2022 +0900

    implement interrogator to test wdv1.4 tagger

commit 07067ea79569b5869e94e5fa42eadee30cfd33b4
Author: toshiaki1729 <116595002+toshiaki1729@users.noreply.github.com>
Date:   Sun Dec 11 15:35:39 2022 +0900

    just rearrange importing

commit ee3710237eb4beeb6332c660293a30b7913d8e0d
Author: toshiaki1729 <116595002+toshiaki1729@users.noreply.github.com>
Date:   Sun Dec 11 15:33:09 2022 +0900

    implement tag scorer (not tested)
2022-12-11 18:15:49 +09:00
.github/workflows Create codeql.yml 2022-11-04 11:55:44 +09:00
javascript restore the method of detecting gallery changes 2022-12-11 01:27:26 +09:00
scripts Squashed commit of the following: 2022-12-11 18:15:49 +09:00
.gitignore Update .gitignore 2022-11-04 20:34:01 +09:00
README-JP.md update READMEs 2022-11-12 23:06:36 +09:00
README.md Update README.md 2022-12-07 00:26:09 +09:00
install.py Squashed commit of the following: 2022-12-11 18:15:49 +09:00
ss01.png edit README 2022-11-12 19:55:02 +09:00
ss02.png edit README 2022-11-12 19:55:02 +09:00
ss03.png edit README 2022-11-12 19:55:02 +09:00
ss04.png edit README 2022-11-12 19:55:02 +09:00
ss05.png Update ss05.png 2022-11-12 20:02:13 +09:00

README.md

Dataset Tag Editor

日本語 Readme

This is an extension to edit captions in training dataset for Stable Diffusion web UI by AUTOMATIC1111.

It works well with text captions in comma-separated style (such as the tags generated by DeepBooru interrogator).

Caption in the filenames of images can be loaded, but edited captions can only be saved in the form of text files.

Installation

Extensions tab on WebUI

Copy https://github.com/toshiaki1729/stable-diffusion-webui-dataset-tag-editor.git into "Install from URL" tab.

Also, if you see this extension listed, you can install from "Available" tab with a single click.

Please note that if you update this extension from "Extensions" tab, you will need to restart web UI to completely reload.

Install Manually

To install, clone the repository into the extensions directory and restart the web UI.

On the web UI directory, run the following command to install:

git clone https://github.com/toshiaki1729/stable-diffusion-webui-dataset-tag-editor.git extensions/dataset-tag-editor

Features

Note. "tag" means each blocks of caption separated by commas.

  • Edit captions while viewing related images
  • Search tags
  • Filter images by tags and edit those captions
  • Batch replace/remove/append tags
  • Use interrogators

Usage

  1. Make dataset using web UI
  2. Load them
    • use interrogator if needed
  3. Edit their captions
    • filter images you want to edit by tags in "Filter and Edit Tags" tab
      • search tags and filter images by tags
      • replace / remove them or append new tags to their captions
    • filter images manually in "Filter by Selection" tab
    • edit captions individually in "Edit Caption of Selected Image" tab
      • you also can use interrogator here
  4. Click "Save all changes" button

Description of Display

Common

  • "Save all changes" buttton
    • save captions to text file
      • changes will not be applied to the text files until you press this button
    • if "Backup original text file" is checked, original text files will be renamed not to be overwritten
      • backup file name will be like filename.000, -.001, -.002, ...
    • new text file will be created if not exists
  • "Results" text box
    • shows save results
  • "Dataset Directory" text box
    • input the directory of training images and load them by clicking "Load" button
    • loading options are below
    • you can make caption on loading by using interrogator if needed
  • "Dataset Images" gallery
    • to view and select images
    • the number of colums can be changed in "Settings" tab

"Filter and Edit Tags" tab

  • "Search Tags" text box
    • search and filter the tags displayed below
  • "Clear tag filters" button
    • clear tag search and filter by tags
  • "Clear ALL filters" button
    • clear all filters including selection filter in next tab
  • "Sort by / Sort order" radio buttons
    • change sort order of the tags displayed below
  • "Filter Images by Tags" checkboxes
    • filter images displayed in the left gallery by tags
      • also filter tags depending on captions of the displayed images
  • "Selected Tags" text box (not editable)
    • shows the selected tags in comma separated style
  • "Edit Tags" text box
    • you can edit the selected tags for all captions of the displayed images
      • each tags will be replaced by the tags in "same place"
      • erase tags by changing it into blank
      • you can append some tags to captions by add new tags at the end
        • the tags will be added to the beggining/end of text files depending on the checkbox below
  • "Apply changes to filtered images" button
    • apply the tag changes only to displayed images

"Filter by Selection" tab

  • "Add selection" button
    • to include selected dataset image in selection
    • "Enter" is shortcut key
    • Tips: you can change the selected image in gallery using arrow keys
  • "Remove selection" button
    • to remove selected image from selection
    • "Delete" is shortcut key
  • "Invert selection" button
    • select all images in the entire dataset that have not been selected
  • "Clear selection" button
    • to remove all current selection, not to clear current filter
  • "Apply selection filter" button
    • apply selection filter on displaying dataset images

"Edit Caption of Selected Image" tab

"Read Caption from Selected Image" tab

  • "Caption of Selected Image" textbox
    • shows the caption of the selected image in the dataset gallery

"Interrogate Selected Image" tab

  • "Interrogate Result" textbox
    • shows the result of interrogator

Common

  • "Copy and Overwrite / Prepend / Apppend" button
    • copy/prepend/append the content in the textbox above to the textbox below
  • "Edit Caption" textbox
    • edit caption here
  • "Apply changes to selected image" button
    • change the caption of selected image into the text in "Edit Tags" textbox