Skip to content
Back to skills

Stable Diffusion Prompt Optimizer

ASecurity

Analyzes and enhances Stable Diffusion prompts using the Automatic1111 WebUI API /sdapi/v1/txt2img endpoint. Applies prompt weighting, negative prompt generation, and A1111-specific syntax like (keyword:weight).

  • 67 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added June 2, 2026
ai-agentspythongogitapisecurity

Works with

  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned June 2, 2026

npx -y skills add agentskillexchange/skills --skill stable-diffusion-prompt-optimizer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Stable Diffusion Prompt Optimizer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Stable Diffusion Prompt Optimizer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/agentskillexchange-stable-diffusion-prompt-optimizer/badge)](https://www.skillsdirectory.com/skills/agentskillexchange-stable-diffusion-prompt-optimizer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "Stable Diffusion Prompt Optimizer"
slug: "stable-diffusion-prompt-optimizer"
description: "Analyzes and enhances Stable Diffusion prompts using the Automatic1111 WebUI API /sdapi/v1/txt2img endpoint. Applies prompt weighting, negative prompt generation, and A1111-specific syntax like (keyword:weight)."
github_stars: 72984
verification: "security_reviewed"
source: "https://github.com/CompVis/stable-diffusion"
category: "Image & Creative Automation"
framework: "Gemini"
tool_ecosystem:
  github_repo: "CompVis/stable-diffusion"
  github_stars: 72984
---

# Stable Diffusion Prompt Optimizer

Analyzes and enhances Stable Diffusion prompts using the Automatic1111 WebUI API /sdapi/v1/txt2img endpoint. Applies prompt weighting, negative prompt generation, and A1111-specific syntax like (keyword:weight).

## Installation

Use the upstream install or setup path that matches your environment:
- conda env create -f environment.yaml
- conda activate ldm
- conda install pytorch torchvision -c pytorch
- pip install transformers==4.19.2 diffusers invisible-watermark

Requirements and caveats from upstream:
- python scripts/txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms
- and renders images of size 512x512 (which it was trained on) in 50 steps. All supported arguments are listed below (type python scripts/txt2img.py --help).

Basic usage or getting-started notes:
- A suitable [conda](https://conda.io/) environment named ldm can be created
- and activated with:
- You can also update an existing [latent diffusion](https://github.com/CompVis/latent-diffusion) environment by running

- Source: https://github.com/CompVis/stable-diffusion
- Extracted from upstream docs: https://raw.githubusercontent.com/CompVis/stable-diffusion/HEAD/README.md

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/stable-diffusion-prompt-optimizer/)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.