匿名用户2024年07月31日
64阅读

技术信息

开源地址
https://modelscope.cn/models/mirror013/DanTagGen
授权协议
Apache License 2.0

作品详情

DaTagGe - V1

DaTagGe(Dabooru Tag Geerator) is ispired from p1atdev's dart project. But with differet arch, dataset, format ad differet traiig strategy.

Model arch

This versio of DTG is traied from scratch with 400M param LLaMA arch.(I my persoal preferece I will call it NaoLLaMA) Sice it is llama arch. Theoritically it should be able to be used i ay LLaMA iferece iterface.

This repo also provided coverted FP16 gguf model ad quatized 8bit/6bit gguf models. Basically it is recommeded to use llama.cpp or llama-cpp-pytho to ru this model. Which will be very fast.

Format

prompt = f"""
ratig: {ratig or '<|empty|>'}
artist: {artist.strip() or '<|empty|>'}
characters: {characters.strip() or '<|empty|>'}
copyrights: {copyrights.strip() or '<|empty|>'}
aspect ratio: {f"{aspect_ratio:.1f}" or '<|empty|>'}
target: {'<|' + target + '|>' if target else '<|log|>'}
geeral: {", ".joi(special_tags)}, {geeral.strip().strip(",")}<|iput_ed|>
"""

for example:

ratig: safe
artist: <|empty|>
characters: <|empty|>
copyrights: <|empty|>
aspect ratio: 1.0
target: <|short|>
geeral: 1girl, solo, drago girl, drago hors, drago tail<|iput_ed|>

Ad you may get somethig like:

ratig: safe
artist: <|empty|>
characters: <|empty|>
copyrights: <|empty|>
aspect ratio: 1.0
target: <|short|>
geeral: 1girl, solo, drago girl, drago hors, drago tail<|iput_ed|>ope mouth, red eyes, log hair, poity ears, tail, black hair, chiese clothes, simple backgroud, drago, hair betwee eyes, hors, chia dress, dress, lookig at viewer, breasts

Dataset ad Traiig

I use the traier I implemeted i HakuPhi to ru the traiig. (It should be HakuLLM ow LoL) with 15epoch o 2M data ad 5epoch o 5.3M data. This model have roughly 6~12B toke see.

The dataset is exported by HakuBooru with my dabooru sqlite database. Use the percetile of fav_cout o each ratig to filter the data. (2M = top 25%, 5.3M = top 75%)

Utilities

I'm implemetig a gradio UI for this thig ad other dev ca utilize the API i it to make differet app. I'm also plaig to make sd-webui extesio.

功能介绍

DanTagGen - V1 DanTagGen(Danbooru Tag Generator) is inspired from p1atdev's dart project. But with d

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论