Sign In

Stable Diffusion : AnimateDiff - Change the default parameters with a little hack

5

Objective

Change the default parameters of the AnimateDiff component.

Environment

Default values

The default values are these:

Save format : GIF + PNG

Closed Loop: R-P

etc.

ARTICLE UPDATED -13 FEB. 2020

4 days ago the Animatediff was updated.. with the new default. settings

If you go to settings > AnimateDiff you can find the default settings and parameters.

Good job for the developers...

Previous solution

Change the AnimateDiff python file

Go to your stable diffusion folder and search for

  1. stable-diffusion-webui

  2. extensions

  3. sd-webui-animatediff

  4. scripts

StableDiffusion\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts

Here you will find some python files.

The UI graphics is the animatediff_ui.py

Edit it with an editor (I will use notepad++ , which is free at https://notepad-plus-plus.org/downloads/)

At line 25 you will notice the class and in the line 27 the __init__ which is the inizialitation.

Here there are the default parameters of the interface.

I will change the closed loop to R+P and the format to "MP4" and "PNG"

I you want to set a single output like MP4 (remove the square brackets)

Here is the result :

This is not mandatory but it is fun, at line 162 you can change a little text :

I added the text "Hacked by MisterMR (27-01-2024)

Then save and close the file..

You need to close and restart Stable Diffusion.

Attention if you update the AnimateDiff component you will loose your changes.

I hope in the future they will add the default options to the Settings>>AnimateDiff.

I hope you enjoy also the teacher..

If you have any question write a comment.

5

Comments