Deforum Stable Diffusion is an official extension for AUTOMATIC1111's Stable Diffusion WebUI, designed to let users perform AI animation and video generation directly within the WebUI interface.
Purpose
The extension integrates Deforum's animation generation capabilities into AUTOMATIC1111 WebUI. Users can generate continuous image frames by setting keyframes, mathematical functions, and prompt changes, ultimately outputting them as videos or GIF animations.
Main Capabilities
- Adds a new Deforum tab in WebUI for configuring animation parameters.
- Supports mathematical keyframe functions to dynamically control prompt weights, camera movement, etc.
- Supports 3D mode, but the depth model is loaded on first run, causing a long delay.
- Allows real-time viewing of animation frames during generation (requires adjusting the preview refresh value in settings, but may slow down generation).
- After generation is complete, users can directly click a button in the GUI to view the video or GIF result.
- Prompt weight handling differs from the original Deforum: weights less than zero do not take effect directly and must be split into positive and negative prompts through the
--negparameter in the JSON section. For example:"apple:where(cos(t)>=0, cos(t), 0), snow --neg strawberry:where(cos(t)<0, -cos(t), 0)".
Usage
- First install AUTOMATIC1111's WebUI.
- Install this extension. There are three methods:
- Within the stable-diffusion-webui folder, use the git command line to clone the repository into the extensions directory;
- Download this repository, create a folder named deforum inside the extensions folder in the WebUI installation directory, place the downloaded contents into it, and then restart WebUI;
- Start A1111, go to the Extensions tab, select Available, find deforum in the available extensions list and install it, then restart A1111 after installation.
- Open WebUI and find the Deforum tab at the top of the page.
- Enter the animation settings. You can refer to the general guide and the mathematical keyframe function guide (provided in the official wiki).
- Run the script. In 3D mode, the peak VRAM usage is about 6.4 GB under default settings; if started with the
--lowvramcommand-line argument, 3D mode VRAM usage does not exceed 3.8 GB. - After generation is complete, click the button to view the video or GIF result in the GUI.
Use Cases
- Create AI animations and video art using Stable Diffusion.
- Need to use keyframes and mathematical functions to precisely control the animation evolution process.
- Complete image generation and animation export in one place within WebUI.
Limitations and Notes
- Must rely on AUTOMATIC1111's WebUI to run.
- This ported version is not fully backward compatible with the old notebook and local versions. Due to the way WebUI handles Stable Diffusion models and changes to the script, results may not be completely consistent, and old settings may cause runtime failures.
- 3D mode has high VRAM requirements, and there will be a noticeable delay when loading the depth model for the first time.
- This program is distributed under the GNU Affero General Public License v3.0, copyright Deforum LLC (2023). Some integrated third-party components may use other licenses; see LICENSE for details.
- The official Discord community (https://discord.gg/deforum)和仓库 Issues page is provided for feedback.