Skip to main content

Batch image generation and manipulation tool supporting Stable Diffusion and related techniques / algorithms, with support for video and animated image processing.

Project description

Documentation GitHub Latest Release ko-fi

dgenerate is a scriptable command-line tool (and library) for generating/editing images and processing animated inputs with AI.

Whether you’re generating or editing single images, batch processing hundreds of variations, or transforming entire videos frame-by-frame, dgenerate provides a flexible, scriptable interface for a multitude of image generation and editing tasks.

For the extensive usage manual, manual installation guide, and API documentation, visit readthedocs.

What You Can Do

Image Generation

  • Generate images using a number of popular model architectures such as: SD, SDXL, SD3, Flux, and Kolors

  • Batch process multiple parameter combinations combinatorially to generate variations

  • Run large models on limited hardware with inference optimizations and quantization

  • Utilize models from HuggingFace and CivitAI for generation

  • Advanced prompt weighting (LPW), SD-WebUI (Common syntax), InvokeAI syntax, and llm4gen (SD1.5 only)

  • Control Nets, T2I Adapters, IP Adapters, LoRA, and Textual Inversion (embeddings)

  • Text to image, image to image, and inpainting

  • Diffusion-based image upscaling

Image Processing

  • Easily chain image processors together for advanced scripted image manipulation

  • Utilize built-in image processors for edge detection, depth mapping, segmentation, feature detection, and more

  • Run upscaling / image restoration models such as ESRGAN, SwinIR, etc… via spandrel

  • Run image processors generically on any image

Animation & Video Processing

  • Transform videos into artistic non-temporally consistent animations

  • Process GIF, WebP, APNG, MP4, and any other video format supported by av (ffmpeg)

  • Memory-efficient, streamed processing of video content from disk

  • Apply image processors to any animated input, for example upscaling / classification / mask generation

Scripting

  • Utilize the built-in shell language to script generation tasks, work in REPL mode from the Console UI

  • Write scripted workflows with intelligent VRAM/RAM memory management, garbage collection, and caching

  • Write plugins such as image processors, prompt weighters, shell language features, etc. in Python if desired

Getting Started

Quick Install

Download an install wizard for your platform from the releases page for a hassle-free setup into an isolated Python environment.

Manual Install

System Requirements

  • GPU: NVIDIA (CUDA 12.1+), AMD (ROCm on Linux), or Apple Silicon

  • Python: 3.11 to 3.13

  • OS: Windows, macOS, or Linux

Note: CPU rendering is possible but extremely slow unless the given model is tailored for it.

Two Ways to Use dgenerate

Command Line

Perfect for automation and batch processing:

dgenerate stable-diffusion-v1-5/stable-diffusion-v1-5 --prompts "a cute cat" --inference-steps 15 20 30

dgenerate --file workflow-config.dgen

Interactive GUI

# launch the Console UI

dgenerate --console

Features a syntax-highlighting console / editor:

  • REPL / code editor for the built in shell language to assist with building complex workflows

  • OpenGL accelerated image preview, featuring smooth zoom / pan, and bounding box / coordinate picker

  • Various templating utilities (recipes, and URI builders) for quickly creating scripts and working interactively

  • In editor documentation for all arguments, and built in image processors / plugins

  • Lightweight multiplatform Tkinter-based UI


Console UI Demo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dgenerate-5.0.0.tar.gz (21.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dgenerate-5.0.0-py3-none-win_amd64.whl (22.4 MB view details)

Uploaded Python 3Windows x86-64

dgenerate-5.0.0-py3-none-macosx_11_0_arm64.whl (22.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

dgenerate-5.0.0-py3-none-any.whl (22.4 MB view details)

Uploaded Python 3

File details

Details for the file dgenerate-5.0.0.tar.gz.

File metadata

  • Download URL: dgenerate-5.0.0.tar.gz
  • Upload date:
  • Size: 21.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dgenerate-5.0.0.tar.gz
Algorithm Hash digest
SHA256 cdb51a1d2c613c1aa645412f7b80c9fcc8a7afec2efc07b63a3ca777ccf855d6
MD5 2410cb6dc2aa3c0fbb23b1f708abdcb1
BLAKE2b-256 04709421ccb7490db031e44fd731482bec03168458aeefb6f86f48b8ecb202f9

See more details on using hashes here.

File details

Details for the file dgenerate-5.0.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: dgenerate-5.0.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 22.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dgenerate-5.0.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 397da68788123b35660e2de50f74aab16bf7cdc1e9e3d836a2e7433ea02488d2
MD5 d379931fd9d25dc34e574f107f3beecb
BLAKE2b-256 e3b385f1093196a9d0bb1fe1565b16ded81d05d75bf964baf12be0890c19b392

See more details on using hashes here.

File details

Details for the file dgenerate-5.0.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dgenerate-5.0.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 31afe7625e4ade207dc171cb216e70578ce5a9aee37634798cd9dcba66a4b6ed
MD5 54e20d9a6321f2d47bb841ae74054e8d
BLAKE2b-256 06ecd81a2ed70458f40ca307d81d4728d461255c7988fc9f8b923fd369c44940

See more details on using hashes here.

File details

Details for the file dgenerate-5.0.0-py3-none-any.whl.

File metadata

  • Download URL: dgenerate-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 22.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dgenerate-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89a8797e9b4a1f541996e5c3ebce30570ee7d9e7922f525913041aeec3ae30e3
MD5 d90082f0d23a34f795f988780197cdb0
BLAKE2b-256 82a2821355890fe64c0e80a08e290252ce612916e016ceee09e747a3398df682

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page