Back to .md Directory
Prompt Generator
A Python tool that uses Qwen3-8B via Ollama to generate high-quality prompts for Stable Diffusion and Flux.
ai prompt safety
View sourcePrompt Generator
A Python tool that uses Qwen3-8B via Ollama to generate high-quality prompts for Stable Diffusion and Flux.
Project Overview
- Core Technology: Qwen3-8B via Ollama
- Purpose: Generate detailed, style-specific prompts for generative AI art
- Key Features:
- Gradio Web UI with style selector and parameter controls
- Fast generation (~7s per prompt)
- 7 style presets (cinematic, anime, fantasy, cyberpunk, etc.)
- Jinja2 templating for customizable prompts
- Temperature/Top-P controls via Ollama API
- Automatic reasoning extraction (strips "Thinking..." blocks)
Key Files
app.py: Gradio web UIqwen_generator.py: Core generator - CLI and Python APIconfig/templates.yaml: Jinja2 style templates
Usage
# Web UI (recommended)
python app.py
# CLI
python qwen_generator.py "a mystical forest" --style fantasy
# CLI with advanced options
python qwen_generator.py "cyberpunk city" --style cyberpunk --temperature 0.8 --emphasis "neon lighting"
# List styles
python qwen_generator.py --list-styles
Requirements
- Python 3.8+
- Ollama with
qwen3:8bmodel
pip install -r requirements.txt
ollama pull qwen3:8b
Development Notes
- Style System: Jinja2 templates in
config/templates.yaml - Thread Safety:
generate_prompt()accepts params directly (stateless) - Output Cleaning:
extract_final_prompt()removes reasoning blocks - Timeout: Default 120s, configurable via
--timeout
Related Documents
GEMINI.md
Totem — Development Rules
- **pnpm only** (never npm/yarn). Use `pnpm dlx` (never `npx`). Windows 11 + Git Bash. TypeScript strict mode.
aipromptgemini
0
3
mmnto-aiGEMINI.md
MechCAD-MLLM
我们将这一新模型暂定名为 **"MechCAD-MLLM"**(面向机械领域的CAD多模态大模型)。
aillmeval
0
2
WHT222GEMINI.md
GEMINI.md — FIM One Instructional Context
FIM One is an AI-powered **Connector Hub** that serves as a bridge between disjointed enterprise systems (ERP, CRM, OA, Databases) through autonomous AI agents.
aiagentllm
0
1
fim-aiGEMINI.md
Agent Instructions
**Layer 1: Directive (What to do)**
aiagent
0
1
mitchelldschafer