GitHub: https://github.com/Teriks/dgenerate
ReadTheDocs: https://dgenerate.readthedocs.io/en
Feature Table: https://github.com/Teriks/dgenerate/blob/master/FEATURE_TABLE.rst
dgenerate
is a cross-platform command line tool and library for generating images and animation sequences using Stable Diffusion and related models.
Alongside the command line tool, this project features a syntax-highlighting Console UI for the dgenerate configuration / scripting language,
which is built on Tkinter to be lightweight and portable.
You can use dgenerate to generate multiple images or animated outputs using multiple combinations of diffusion input parameters in batch, so that the differences in generated output can be compared / curated easily. This can be accomplished via a single command, or through more advanced scripting with the built-in interpreted shell-like language if needed.
Animated output can be produced by processing every frame of a Video, GIF, WebP, or APNG through various implementations of diffusion in img2img or inpainting mode, as well as with ControlNets and control guidance images, in any combination thereof. MP4 (h264) video can be written without memory constraints related to frame count. GIF, WebP, and PNG/APNG can be written WITH memory constraints, IE: all frames exist in memory at once before being written.
Video input of any runtime can be processed without memory constraints related to the video size. Many video formats are supported through the use of PyAV (ffmpeg).
Animated image input such as GIF, APNG (extension must be .apng), and WebP, can also be processed WITH memory constraints, IE: all frames exist in memory at once after an animated image is read.
PNG, JPEG, JPEG-2000, TGA (Targa), BMP, and PSD (Photoshop) are supported for static image inputs.
In addition to diffusion, dgenerate also supports the processing of any supported image, video, or animated image using any of its built-in image processors, which include various edge detectors, depth detectors, segment generation, normal map generation, pose detection, non-diffusion based AI upscaling, and more. dgenerate's image processors may be used to pre-process image / video input to diffusion, post-process diffusion output, or to process images and video directly.
dgenerate brings many major features of the HuggingFace diffusers
library directly to the command line in a very flexible way with a near one-to-one mapping, akin to ffmpeg, allowing for creative uses as powerful as direct implementation in python with less effort and environmental setup.
dgenerate is compatible with HuggingFace as well as typical CivitAI-hosted models, prompt weighting and many other useful generation
features not mentioned here are supported, please see readthedocs for the most complete overview
of features, and the usage manual.
dgenerate can be easily installed on Windows via a Windows Installer MSI containing a frozen python environment,
making setup for Windows users easy, and likely to "just work" without any dependency issues.
This software requires a Nvidia GPU supporting CUDA 12.1+, AMD GPU supporting ROCm (Linux Only), or MacOS on Apple Silicon.
CPU rendering is possible for some operations but extraordinarily slow.
Supported generative model types include:
--model-type torch
(SD 1.5 - SD 2.*)--model-type torch-pix2pix
(SD 1.5 - SD 2.* - Pix2Pix)--model-type torch-sdxl
(Stable Diffusion XL)--model-type torch-if
(Deep Floyd Stage 1)--model-type torch-ifs
(Deep Floyd Stage 2)--model-type torch-if-img2img
(Deep Floyd Stage 2 - Img2Img)--model-type torch-sdxl-pix2pix
(Stable Diffusion XL - Pix2Pix)--model-type torch-upscaler-x2
(Stable Diffusion x2 Upscaler)--model-type torch-upscaler-x4
(Stable Diffusion x4 Upscaler)--model-type torch-s-cascade
(Stable Cascade)--model-type torch-sd3
(Stable Diffusion 3 and 3.5)--model-type torch-flux
(Flux.1)There are no datasets linked
There are no models linked
There are no datasets linked
There are no models linked