skillfed

dynamicprompts

Dynamic prompts templating library for Stable Diffusion

dynamicprompts v0.31.0 157.0K downloads/30d#10,769 on PyPI
Permissive license DORMANT released

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 dynamicprompts

uv

uv add dynamicprompts

poetry

poetry add dynamicprompts

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Text Processing

Tags

prompt template generationstable diffusion prompt buildertext-to-image prompt templatingdynamic prompt variantswildcard prompt expansionprompt engineering librarycombinatorial prompt generation
prompt-engineeringstable-diffusiontemplate-generation

More Text Processing packages