Code Monkey home page Code Monkey logo

z-a1111-sd-webui-dtg's Introduction

A1111-SD-WebUI-DTG

A sd-webui extension for utilizing DanTagGen to "upsample prompts".

It can generate the detail tags/core tags about the character you put in the prompts. It can also add some extra elements into your prompt.

an extra z is added to repo name to ensure this extension will run process() after other extensions

What is DanTagGen

DanTagGen(Danbooru Tag Generator) is a LLM model designed for generating Danboou Tags with provided informations. It aims to provide user a more convinient way to make prompts for Text2Image model which is trained on Danbooru datasets.

More information about model arch and training data can be found in the HuggingFace Model card:

KBlueLeaf/DanTagGen-beta · Hugging Face

How to use it

After install it into the sd-webui or sd-webui-forge. Just enable it in the acordion. It will automatically read the content of your prompt and generate more tags based on your prompt.

Options

  • tag length:
    • very short: around 10 tags
    • short: around 20 tags
    • long: around 40 tags
    • very long: around 60 tags
    • short or long is recommended
  • Ban tags: The black list of tags you don't want to see in final prompt. Regex supported.
  • Prompt Format: The format of final prompt. Default value is the recommended format of Kohaku XL Delta
  • Seed: the seed of prompt generator. Since we use temperature/top k/top p sampling, so it is not deterministic unless you use same seed. -1 for random seed.
  • Upsampling timing:
    • After: after other prompt processings, for example: after dynamic prompts/wildcard.
    • Before: Before other prompt processings.
  • Temperature: Higher = more dynamic result, Lower = better coherence between tags.

Example

image

Faster inference

If you think the transformers implementation is slow and want to get better speed. You can install llama-cpp-python by yourself and then download the gguf model from HuggingFace and them put them into the models folder.

(Automatic installation/download script for llama-cpp-python and gguf model are WIP)

More information about llama-cpp-python:

z-a1111-sd-webui-dtg's People

Contributors

kohakublueleaf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.