HaW-Tagger / HWtagger

A tagging software made to tag images. It's primary use is for training Stable Diffusion checkpoints and loras.
GNU General Public License v3.0
12 stars 1 forks source link

Introduction

This application is tool to help people who train loras for stable diffusion. Its goal is to facilitate automatically tagging and editing the tags manually, while offering the ability to quickly share databases between users of the app.

A changelog is available at the bottom of this page

Installation

We don't know if it works with linux, we don't have access to a computer running Linux and an NVIDIA card directly, but it should work better if the dependencies are properly met. (Update: We have a few reports of it working with linux).

Windows instructions

If you own a NVIDIA GPU

The instructions requires installing the CUDA toolkit and CUDNN versions 11.8 if you want to run the auto-taggers on your GPU, the app should work without it though, just slowly while using them.

You can follow this tutorial on how to install it: https://medium.com/geekculture/install-cuda-and-cudnn-on-windows-linux-52d1501a8805#3e72 In the tutorial, it's also explained that to download the CUDNN installer you need an NVIDIA account.

Installation

We assume you already have python and git installed. We both use python 3.10.11. Using this specific version of python is HIGHLY recommended because the last Tensorflow doesn't support GPUs on Windows starting from version 2.11, and xformers that is compatible with this version of tensorflow (2.10) requires python 3.10. Tensorflow is only used to handle the dataloader for the code that loads the taggers, scorer, etc ... For Windows, any tensorflow version between 2.0.0 to 2.10 should be fine to use, any tensorflow version above 2.10 doesn't directly support GPUs on Windows, that's why we recommend using python 3.10.X Even if you solve the tensorflow problem, you might hit a problem with xformers on windows, so this is the recommended version, because the compatibility between tensorflow, pytorch and xformers are resolved. I want to make it compatible with all versions, but xformers and CUDA are a pain in the ass.

Clone the repository: git clone https://github.com/HaW-Tagger/HWtagger/

Run the install.bat (make sure to have CUDA toolkit or else xformers may cause install errors)

Download the following models: https://huggingface.co/PhoenixAscencio/HWtagger and place the models folder in this repository (models should be placed in the models folder, screenshot of folder structure attached in link).

The installation should be done

Running the tagger

You can run the tagger by using the run.bat

*for linux, you might need to change how the venv is activated from .venv\scripts\activate to .venv\bin\activate

How to wiki link

https://github.com/HaW-Tagger/HWtagger/wiki/How-to-use-(basic-tutorial)

Changelog

14/07/24

Added:

Changes:

Fix:

25/06/24

17/06/24