dynamicprompts
Dynamic prompts templating library for Stable Diffusion
What it is and what it does
Dynamic Prompts is a templating library that transforms single prompt templates into multiple varied prompts for text-to-image generators. It lets you define variants using curly-brace syntax (e.g., `{red|green|blue}`), reference reusable wildcard files (e.g., `__colors__`), and use Jinja2 for advanced templating. The library can generate prompts randomly or exhaustively (all combinations), making it useful for batch-generating diverse image prompts without manual repetition.
The package depends on jinja2 for template processing and pyparsing for parsing the custom template syntax. It supports Python 3.8 through 3.11 and integrates with the Automatic1111 Stable Diffusion web UI extension. However, the package has been dormant since March 2024, so it receives no active maintenance or updates.
Use it for:
- Generate multiple image prompts from a single template to explore variations without manual rewriting
- Build reusable wildcard libraries (colors, materials, subjects) to compose consistent prompt families
- Exhaustively generate all possible prompt combinations to systematically test image generation outputs
- Integrate prompt templating into batch image generation workflows for Stable Diffusion or similar tools
- Create complex prompts with Jinja2 logic for conditional or computed prompt segments
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates varied text prompts for image generators like Stable Diffusion by parsing templates with variants, wildcards, and Jinja2 expressions into multiple concrete prompts.
Yes, if you actively use Stable Diffusion or similar text-to-image generators and need to generate many prompt variations. The low install friction and permissive license make it safe to try. However, the dormant maintenance status means you should verify compatibility with your current image generator version and be prepared to fork or find alternatives if critical bugs emerge. Not recommended if you need active support or expect the package to evolve.
Install
dynamicprompts on PyPI
pip
pip install dynamicpromptsuv
uv add dynamicpromptspoetry
poetry add dynamicpromptsInstalling dynamicprompts
Before you install
Low friction install with only jinja2 and pyparsing as runtime dependencies. Package is dormant (876 days since last release in March 2024), so expect no active maintenance or bug fixes going forward.
License in practice
MIT license (permissive) means you can use, modify, and distribute the package freely with minimal restrictions, though you must include the license notice.
Quickstart
pip install dynamicprompts
from dynamicprompts.generators import RandomPromptGenerator
generator = RandomPromptGenerator()
results = generator.generate("I love {red|green|blue} roses", num_images=5)
Verify before relying
- Whether the package still works with current versions of Stable Diffusion or other image generators it targets
- Whether the optional extras (magicprompt, attentiongrabber) are still functional or maintained elsewhere
- Active community or alternative maintained forks given the dormant status
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — jinja2, pyparsing |
| Maintenance | dormant — 876 days since the last release |
| First released | |
| Downloads | 157,039/month — #10,769 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dynamicprompts-0.31.0-py3-none-any.whl
Keywords: automatic1111, prompt engineering, stable diffusion, text2img
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
clip-interrogatorGenerates natural-language prompts from images…
permissive · top 15,000 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
questoQuesto provides modular, extensible CLI prompt…
permissive · top 15,000 on PyPI
diffusersDiffusers provides pretrained diffusion models…
permissive · top 5,000 on PyPI
prompthub-pyFetches prompt templates from Prompt Hub or…
permissive · top 15,000 on PyPI
sphinx-promptSphinx Prompt is a Sphinx extension that…
permissive · top 5,000 on PyPI
banksBanks is a template language and prompt…
permissive · top 5,000 on PyPI
ell-aiell-ai is a functional prompt engineering…
permissive · top 15,000 on PyPI
brancaBranca generates HTML and JavaScript pages from…
permissive · top 5,000 on PyPI
beaupyBeauPy provides interactive CLI…
permissive · top 15,000 on PyPI