sd-tagtool

所属分类:内容生成
开发工具:Vue
文件大小:0KB
下载次数:0
上传日期:2023-07-17 15:14:25
上 传 者sh-1993
说明:  一个稳定的扩散训练数据集标记编辑器。,
(A stable diffusion training dataset tag editor.,)

文件列表:
.vscode/ (0, 2023-11-28)
.vscode/extensions.json (109, 2023-11-28)
images/ (0, 2023-11-28)
images/screenshot.webp (207156, 2023-11-28)
index.html (358, 2023-11-28)
package.json (645, 2023-11-28)
pnpm-lock.yaml (25295, 2023-11-28)
public/ (0, 2023-11-28)
public/tauri.svg (2599, 2023-11-28)
public/vite.svg (1497, 2023-11-28)
src-tauri/ (0, 2023-11-28)
src-tauri/Cargo.lock (99861, 2023-11-28)
src-tauri/Cargo.toml (903, 2023-11-28)
src-tauri/build.rs (37, 2023-11-28)
src-tauri/icons/ (0, 2023-11-28)
src-tauri/icons/128x128.png (3512, 2023-11-28)
src-tauri/icons/128x128@2x.png (7012, 2023-11-28)
src-tauri/icons/32x32.png (974, 2023-11-28)
src-tauri/icons/Square107x107Logo.png (2863, 2023-11-28)
src-tauri/icons/Square142x142Logo.png (3858, 2023-11-28)
src-tauri/icons/Square150x150Logo.png (3966, 2023-11-28)
src-tauri/icons/Square284x284Logo.png (7737, 2023-11-28)
src-tauri/icons/Square30x30Logo.png (903, 2023-11-28)
src-tauri/icons/Square310x310Logo.png (8591, 2023-11-28)
src-tauri/icons/Square44x44Logo.png (1299, 2023-11-28)
src-tauri/icons/Square71x71Logo.png (2011, 2023-11-28)
src-tauri/icons/Square89x89Logo.png (2468, 2023-11-28)
src-tauri/icons/StoreLogo.png (1523, 2023-11-28)
src-tauri/icons/icon.icns (98451, 2023-11-28)
src-tauri/icons/icon.ico (86642, 2023-11-28)
src-tauri/icons/icon.png (14183, 2023-11-28)
src-tauri/shared/ (0, 2023-11-28)
... ...

# sd-tagtool [中文看这里](https://github.com/skiars/sd-tagtool/blob/master/README-CN.md) This is a simple tag editor for stable diffusion datasets. It can be used to edit datasets generated by automatic labeling tools. This tool is inspired by [BooruDatasetTagManager](https://github.com/skiars/sd-tagtool/blob/master/https://github.com/starik222/BooruDatasetTagManager). ### Features - Support display and management of all image tags - Support undo/redo - Intelligent prompt for tag input (support fuzzy matching) - Support drag and drop for tags - Tags can be inserted/deleted in batches, and the insertion position can be specified - Datasets can be filtered by tags - Customized tag highlighting - Automatic translation (translation to Chinese is now hard-coded, and may require magic to surf the Internet) - Quick response ## Screenshot ![screenshot.png](https://github.com/skiars/sd-tagtool/blob/master/images/screenshot.webp) ## Download / Install sd-tagtool supports Windows, macOS, and Linux. The installation steps are as follows: 1. Find the latest version on the [Release](https://github.com/skiars/sd-tagtool/blob/master/https://github.com/skiars/sd-tagtool/releases) page; 2. Download the installation package file from the **Assets** list according to the OS, for example, the suffix of the Windows installation file is **_.msi_** or **_.exe_**; 3. Run the installation file. **Note**: sd-tagtool may require newer Windows 10 or Windows 11. Also, I don't often test for compatibility with Linux and macOS. ## Usage You can try the basic usage by yourself, only a few details are added here. ### Basic tag editing When you select a picture, drag the tag of the image to sort it, or click the `×` icon on the tag to delete. But the tags cannot be sorted when multiple images are selected. You can also turn on the *edit all tags* switch, which will: - Delete tags in the entire data set (all tags are displayed at the bottom of the window). For example, deleting "1girl" in all tags will cause the "1girl" tag in all images to be deleted; - When inserting or replacing tags, all images in the dataset will be operated, not just the selected images. ### Tag highlight You can choose a highlight color for the tag in *Pick color* of the tag's context menu (click the right mouse button), so that you can find it quickly. When you don't need the tag highlighting anymore, you can clear it by *Clear picked color* in the context menu. ### Select tags Click a tag with the left mouse button in the tag list to select it. Hold down the `Ctrl` key to select multiple tags, and hold down `Shift` to select multiple tags by range. The selected tags can be copied or added to the filter through the content menu. ### Tags filter Enter the tags to be filtered in the tags filter input at the top, and then click the *Filter* button to filter the dataset. Two filtering modes can be selected via the *exclude* checkbox: - **Include mode**: when the image has all the tags in the filter, it will be displayed in the filtered list; - **Exclude mode**: Images that do not have all the tags in the filter will be shown in the filtered list. After editing the dataset, you need to click the *Filter* button again to update the filtered dataset. You can enter tags manually, or right-click in the tags list and add selected tags to the filter via the *Add filter* menu. ### Insert tags Enter a tag in the tags input box and click the *Insert* button to insert a new tag into the selected dataset (you can select multiple images). As you can see tags input box can fill in multiple tags. The insertion position is specified by the *position* box. These modes are currently supported: - **auto**: Insert tags to tail if there is no label to be inserted in the image, otherwise do nothing; - **Positive number**: Insert tags into the position counting from the head, if the tag already exists in the image, it will be moved to the specified position; - **Negative number**: Similar to positive numbers, but counting from the tail to the front. The insertion position can exceed the actual number of tags in the image, and the tags will be inserted at the head or tail position at this time. Double-clicking a tag directly in the list of all labels will also insert it into the tag set of the selected images. The insertion position at this time is also determined by the *position*. ### Replace tags Click the `>` button on the left side of the tag editing bar to open the tag replacement bar. Enter the tags for replacement in the *replace with* input box, and click the *Replace* button to replace the tags. Tag replacement is one-to-one correspondence, for example: - Replace `a,b,c` with `d,e,f` means: `a` is replaced by `d`, `b` is replaced by `e`, `c` is replaced by `f`; - Replace `a,b,c` with `d,e` means: `a` is replaced with `d`, `b` is replaced with `e`, `f` is deleted; - Replace `a,b` with `d,e,f` means: `a` replaced with `d` and `b` replaced with `e,f`. The specific replacement process for each tag is: - The replaced tag will appear in the position of the original tag; - If the replaced tag already exists in the image tag list, subsequent duplicates will be removed; - If the image does not have the original tag, the corresponding replacement will not be performed; - You can also delete tags by replacing them with nothing. ### Undo / Redo Click *Undo* and *Redo* in the *Edit* menu to undo and redo, and you can also use the shortcut keys to do it. There is no step limit for undo and redo, but there is currently no reasonable interactive feedback (this will lead to you may not know what happened). Also, the undo history is cleared after opening a new directory. ### Translation Click the *Translate tags* menu of *View* to enable automatic translation. ### Delete isolated txt files After delete the image files in the dataset folder, you can delete the remaining *\*.txt* files using *Delete isolated txt* in the *Tools* menu. The command will pop up a dialog to confirm the files that need to be deleted. ## Development This project is based on [Tauri](https://github.com/skiars/sd-tagtool/blob/master/https://tauri.app/) and [Vue.js](https://github.com/skiars/sd-tagtool/blob/master/https://vuejs.org/). To build this project, you need to install Nojde.js and pnpm. Use these commands to install to Windows: ``` bash winget install nodejs # install Node.js winget install pnpm # install pnpm ``` Then follow this [document](https://github.com/skiars/sd-tagtool/blob/master/https://tauri.app/v1/guides/getting-started/prerequisites) to configure the Rust toolchain and WebView2. You can also install rustup with winget, if you use Windows: ``` bash winget install rustup ``` Use the following commands to build when everything is in place: ``` bash pnpm install # install all dependencies pnpm tauri dev # build the debug program and start ``` According to my test, `pnpm tauri dev` is abnormal under Linux desktop, and can only be debugged with Windows or macOS. Build the release version with the these command: ``` bash pnpm tauri build ``` The user-facing installation package is automatically built by GitHub Action, and the specific configuration is [here](https://github.com/skiars/sd-tagtool/blob/master/.github/workflows).

近期下载者

相关文件


收藏者