Skip to content

v4.0.3 (Flux, IP Adapters, T2I Adapters, Input Batching)

Compare
Choose a tag to compare
@Teriks Teriks released this 05 Sep 00:51
· 150 commits to master since this release

v4.0.3 release with Windows installer.

Due to the size of the packaged python environment, the installer is within a multi-part zip file.

The multipart zip can be extracted using 7-Zip: https://www.7-zip.org/

Download both dgenerate_installer.zip.001 and dgenerate_installer.zip.002 to a folder.

Unzip dgenerate_installer.zip.001 to a directory (Right click, 7-Zip -> Extract to "dgenerate_installer") and then run dgenerate_installer\dgenerate.msi to install.

dgenerate will be installed under C:\Program Files\dgenerate by default with an isolated python environment provided.

The install directory will be added to PATH, and dgenerate will be available from the command line.

Portable Install

A portable install is provided via dgenerate_portable.zip.001 and dgenerate_portable.zip.002, these contain
nothing but the dgenerate executable and a frozen python environment which can be placed anywhere.

4.0.3 Patch Fix

runwayml has removed their stable diffusion 1.5 repository from Hugging Face, breaking single file loads in the diffusers library and anything that uses it.

This release upgrades diffusers to 0.30.2 where the issue has been worked around by instead referencing Lykon/dreamshaper-8

All references to the runwayml model on Hugging Face have been removed from this project, including in documentation.

4.0.0 Features

The command line interface remains backwards compatible for all supported model types, the major version change is mostly due to breaking library API changes and the complete removal of Flax/Jax support.

All support for Flax/Jax has been removed because there is only minimal support or adoption of it anywhere currently, and seemingly no work being done on it in the diffusers library. Also this alleviates quite a bit of dependency hell and possible issues caused by having torch and Flax/Jax in the same package as dependencies.

  • Support for Flux in txt2img mode, add associated options: --flux-second-prompts, --flux-max-sequence-length. Single file loads from a .safetensor file is partially supported for Flux, you must specify the VAE and Text Encoders manually.

  • Add Flux support to sd-embed prompt weighter internal plugin, prompt weighting syntax can be used with Flux when --prompt-weighter sd-embed is specified.

  • New Console UI recipes for Flux that are optimized by default to run (slowly) on even old hardware or GPUs with less than 12gb of VRAM.

  • Stable Diffusion 3 now supports per LoRA scale values.

  • The option --lora-fuse-scale has been added to control the LoRA scale once all LoRA models have been fused together at their individual scale values. This controls at what scale the merged LoRA weights are fused into the main model, these weights possibly being merged from multiple LoRA models at different individual scales.

  • Support loading a transformer model for new diffusion architectures based on transformer architecture (SD3 and Flux) via the argument --transformer, this new option is nearly identical to --unet/--unet2. Transformers can be quantized via the quantize URI argument using optimum.quanto. The quantize argument accepts a string value which is the datatype for quantization, for example qint8, qfloat8, etc. Acceptable values are listed in the --help text of the --transformer argument.

  • Text encoders specified with --text-encoders/--text-encoders2 can now be quantized via the quantize URI argument using optimum.quanto. Acceptable values are listed in the --help text of the --text-encoders argument.

  • Support loading multiple IP Adapter models with --ip-adapters.

  • Support loading an image encoder with --image-encoder for use with IP Adapters and Stable Cascade.

  • New --image-seeds syntax for specifying IP Adapter images, see: Specifying IP Adapters

  • Support loading multiple T2I Adapter models with --t2i-adapters, T2I Adapters function identically to Control Nets in terms of image input specification with --image-seeds. They are essentially another form of control guidance model, and support Open Pose / Depth inputs etc. similar to Control Nets. T2I Adapters are a bit less resource intensive, but do not currently support img2img or inpainting, only txt2img.

  • Support image input batching for img2img and inpainting mask images, allowing multiple input images to be processed on the GPU at once. New --image-seeds syntax feature added to support this, see: Batching Input Images and Inpaint Masks

  • --seed-image-processors and --mask-image-processors now support the + syntax previously supported by --control-image-processors in order to allow for selective processing of input images when multiple img2img or inpaint masks are specified. This is covered in the Image Processors section: Multiple control net images, and input image batching

  • Added the resize image processor which implements basic image resizing using the usual resampling algorithms in Pillow. This can be useful for resizing input images to Stable Cascade when multiple are provided, as there is not a mechanism to do so from --image-seeds

  • Stable Cascade can now use the new input batching syntax of --image-seeds to process multiple input images as a style reference, Stable Cascade does not use multiple images for batching like other pipelines, but as image prompts.

  • Improved --help output formatting and readability for dgenerate and dgenerate --sub-command image-process

  • torch 2.4.0 and diffusers 0.30.0