1 Star 0 Fork 0

db/stable-diffusion-webui-dataset-tag-editor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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 reload completely.

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 and save captions in text file (webUI style) or json file (kohya-ss sd-scripts metadata)
  • Edit captions while viewing related images
  • Search tags
  • Filter images to edit their caption by tags
    • AND/OR logic can be used in each Positive/Negative filters
  • Batch replace/remove/append tags
  • Batch sort tags
  • Batch search and replace
  • Use interrogators
    • BLIP, DeepDanbooru, SmilingWolf's WDv1.4 Tagger (v1, v2 and some variants of them)
  • Batch remove image and/or caption files

Usage

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

By the way, how can I edit tags quickly?

Basic workflow is as follows:

  1. Filter images
  2. Batch edit

Please note that all batch editing will be applyed only to displayed images (=filtered images).

1. Which filter is appropriate?

  • I want to edit all at once
    No filter is required.
  • Some images require editing
    1. They should / shouldn't already have same tag(s)
      Go to "Filter by Tags" so that the only images to be edited are displayed.
    2. They have nothing in common
      Go to "Filter by Selection" and apply.
      Images can also be added to the filter by pushing [Enter] key.

2. How can I edit as I want?

  • I want to add some new tags

    1. Go to "Batch Edit Captions" tab
    2. Append tags to "Edit tags" textbox
    3. Push "Apply changes to filtered images" button

      "foo" and "bar" will be added to all images displayed.
  • I want to replace the tags which are common to displayed images

    1. Go to "Batch Edit Captions" tab
    2. Replace tags in "Edit tags" textbox
    3. Push "Apply changes to filtered images" button

      "male focus" and "solo" will be replaced with "foo" and "bar".
  • I want to remove some tags
    The same as replacing. Just replace the tags with "blank".
    Also you can use "Remove" tab in "Batch Edit Captions".

  • I want to add/replace/remove tags more flexibly

    1. Go to "Batch Edit Captions" tab
    2. Use "Search and Replace" with "Use regex" checked

      "1boy", "2boys", … will be replaced with "1girl", "2girls", … in each tags of images displayed.
      A comma will be regarded as the sepalator of two tags.
      By using regex, you can add/replace/remove tags according to more complex conditions.

Description of Display

Moved to here

MIT License Copyright (c) 2022 toshiaki1729 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

功能丰富的UI选项卡,允许图像查看、搜索过滤和编辑。 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dbscholar0/stable-diffusion-webui-dataset-tag-editor.git
git@gitee.com:dbscholar0/stable-diffusion-webui-dataset-tag-editor.git
dbscholar0
stable-diffusion-webui-dataset-tag-editor
stable-diffusion-webui-dataset-tag-editor
feature/visualize-tokens

搜索帮助