⚠️ This project contains NSFW-related features. 18+ content may be generated. Use responsibly.
This is a customized version of the default sd-stablediffusion extension from SillyTavern.
- Adds
/sd ex_imagebutton - Automatically summarizes character appearance, clothing, expression, and background based on chat context
- Builds an optimized prompt for Stable Diffusion
- Uses a local LLM (aya-expanse-32b Q4) for reasoning
- Includes caching to reduce redundant prompts
- Clone or download this folder and replace the
stable-diffusionextension in your SillyTavernextensions/directory - Set up your local LLM endpoint (e.g. Oobabooga compatible)
- Open
index.js, and modify the following line in thegetLLMCompletionfunction:
const response = await fetch("http://xxx.xxx.xxx.xxx:yyyy/v1/completions", {- Restart SillyTavern and enjoy automatic image generation
This extension uses a local LLM:
- Model:
aya-expanse-32b-abliterated.i1-Q4_K_M.gguf - Inference engine:
llama.cpporOobaboogawith OpenAI-compatible endpoint - Prompt max tokens: 640
- Temperature: 0.025
This extension includes logic for handling NSFW content based on character behavior and clothing state.
It may generate adult-oriented prompts or images, depending on conversation context.
Use at your own discretion, and make sure it complies with your local laws and platform rules.
This extension is a derivative work of the sd-stablediffusion extension in the SillyTavern project, which is licensed under AGPL-3.0.
Therefore, this code is also released under the terms of the GNU Affero General Public License v3.0.
この拡張は、SillyTavern に標準で含まれている sd-stablediffusion 拡張をベースに、
チャットの内容を自動で要約し、画像生成用のプロンプトを構築して出力する機能を追加したものです。
🖼️ ex_imageボタンを追加(チャット内容に応じた画像生成を開始)- キャラクター設定タグ(体、服、性格など)を自動で抽出・英訳
- チャット履歴から行動・場所・表情などを2段階で要約
- 最終的なプロンプトを構築して Stable Diffusion へ送信
- 同一シーンではプロンプトの再生成を省略(キャッシュあり)
ローカルで動かしているLLM(大規模言語モデル)を使用しています:
- モデル名:
aya-expanse-32b-abliterated.i1-Q4_K_M.gguf - 推論環境:Oobabooga または llama.cpp(OpenAI互換API経由)
- トークン数:最大 640
- 温度:0.025
- このフォルダごと
extensions/stable-diffusion/に上書きコピー - Oobabooga 側のAPIが
/v1/completionsに対応していればOK - index.jsを開き、getLLMCompletionの
const response = await fetch("http://xxx.xxx.xxx.xxx:yyyy/v1/completions", {を自分のIPアドレス、ポートに変える。
4. SillyTavern を再起動して、チャット画面に 🖼️ ex_image ボタンが出れば成功
この拡張は、SillyTavern 本体に含まれる
sd-stablediffusion を元に改造しています。
元の拡張は AGPL-3.0 ライセンスで提供されており、本改造版も同じライセンスに従って公開しています。
この拡張は、キャラクターの状態や会話内容に応じて、
NSFW(成人向け)な内容のプロンプト・画像を生成する可能性があります。
使用は自己責任でお願いします。
また、使用する環境・地域のルールや法律に従ってください。
GNU Affero General Public License v3.0 (AGPL-3.0) に基づき公開しています。
詳細は LICENSE ファイル を参照してください。