--- license: openrail tags: - stable-diffusion - text-to-image --- # th-diffusion このモデルは、[SD2-1(768)](https://huggingface.co/stabilityai/stable-diffusion-2-1)からアニメスタイルの画像を学習させたものです。SDからアニメスタイルを自力で作ってみたかっただけです。 学習方法は[WD1-4](https://huggingface.co/hakurei/waifu-diffusion-v1-4)とほとんど同じであり、データセットも学習ステップ数も負けてるので劣化版でしかないです。 diffusers用のとwebui用のsafetensorsを置いてます。 このモデルの学習は三段階に分かれます。 1. 13万枚の画像を10エポック学習:A100 80GBで20時間くらい 2. 39万枚の画像をText endoderを含めて1エポック・含めずに追加で3エポック学習:RTX3090で80時間くらい 4. 61万枚の画像を3エポック学習:RTX3090で100時間くらい 学習設定: + 解像度 768×768を基準にしたAspect ratio bucketing.半分くらいが縦896横640です。 + 学習率 5e-6のconstant + batch size 1.は20 2.3.は16 + タグ [WD1-4tagger](https://huggingface.co/SmilingWolf/wd-v1-4-vit-tagger)を利用しました。 2.3.は[WD1-4のタグ付け規則](https://gist.github.com/harubaru/313eec09026bb4090f4939d01f79a7e7)に従っています。 そのため機能するプロンプトやネガティブプロンプトはWD1-4と変わりません。 右にある変な奴で試せますが、ネガティブプロンプトがないのであんまりいい画像はでないよ。 # 生成例 てきとう、ネガティブプロンプトはworst quality, low quality, medium quality, deleted, lowres, comic, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, jpeg artifacts, signature, watermark, username, blurry CFG_scaleは10、高めにしたほうがいいかも。 masterpiece,best quality,1girl,solo,sitting,blush,red eyes,blonde hair,twintails,hair ribbon,school uniform,blue sailor collar,blue skirt,black thighhighs ![image](grid-0084.png) masterpiece,best quality,absurdres,safe,1girl,solo,one eye closed, brown hair, side ponytail, maid, maid headdress, white thighhighs ![image](grid-0082.png) masterpiece,best quality,hakurei reimu,touhou,solo,blush,brown hair,red eyes,frills,navel , yellow ascot, detached sleeves,hair bow,hair tubes ![image](grid-0087.png)