Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

⚠️ This project contains NSFW-related features. 18+ content may be generated. Use responsibly.

sd-stablediffusion (Extended Prompt Version)

This is a customized version of the default sd-stablediffusion extension from SillyTavern.

✨ Features

  • Adds /sd ex_image button
  • 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

📦 Installation

  1. Clone or download this folder and replace the stable-diffusion extension in your SillyTavern extensions/ directory
  2. Set up your local LLM endpoint (e.g. Oobabooga compatible)
  3. Open index.js, and modify the following line in the getLLMCompletion function:
const response = await fetch("http://xxx.xxx.xxx.xxx:yyyy/v1/completions", {
  1. Restart SillyTavern and enjoy automatic image generation

🧠 LLM Setup

This extension uses a local LLM:

  • Model: aya-expanse-32b-abliterated.i1-Q4_K_M.gguf
  • Inference engine: llama.cpp or Oobabooga with OpenAI-compatible endpoint
  • Prompt max tokens: 640
  • Temperature: 0.025

⚠️ NSFW Content Notice

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.

🔖 License

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.

sd-stablediffusion 拡張改造版(ex_imageボタン付き)

この拡張は、SillyTavern に標準で含まれている sd-stablediffusion 拡張をベースに、
チャットの内容を自動で要約し、画像生成用のプロンプトを構築して出力する機能を追加したものです。

✅ 追加された機能

  • 🖼️ ex_image ボタンを追加(チャット内容に応じた画像生成を開始)
  • キャラクター設定タグ(体、服、性格など)を自動で抽出・英訳
  • チャット履歴から行動・場所・表情などを2段階で要約
  • 最終的なプロンプトを構築して Stable Diffusion へ送信
  • 同一シーンではプロンプトの再生成を省略(キャッシュあり)

🧠 使用モデル(LLM)

ローカルで動かしているLLM(大規模言語モデル)を使用しています:

  • モデル名:aya-expanse-32b-abliterated.i1-Q4_K_M.gguf
  • 推論環境:Oobabooga または llama.cpp(OpenAI互換API経由)
  • トークン数:最大 640
  • 温度:0.025

💡 導入方法

  1. このフォルダごと extensions/stable-diffusion/ に上書きコピー
  2. Oobabooga 側のAPIが /v1/completions に対応していればOK
  3. 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(成人向け)コンテンツについて

この拡張は、キャラクターの状態や会話内容に応じて、
NSFW(成人向け)な内容のプロンプト・画像を生成する可能性があります。

使用は自己責任でお願いします。
また、使用する環境・地域のルールや法律に従ってください。

📄 ライセンス

GNU Affero General Public License v3.0 (AGPL-3.0) に基づき公開しています。
詳細は LICENSE ファイル を参照してください。

About

No description or website provided.

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Contributors

Languages