Type | Other |
Stats | 654 |
Reviews | (307) |
Published | May 14, 2023 |
Base Model | |
Hash | AutoV2 B8968EF90C |
This was a requested guide on how to generated smooth Gifs using SD-Auto1111, this is overall done in 3 big steps:
Finding the right resources for the generation
Processing the generated data into Gif
post-Processing the Gif by applying interpolation (smoothing)
for this guide you'll need to download :
Img Slices To Gif script (placed in the Scripts folder on Auto1111, and used within Auto1111 )
Controlled Parameters Animation script (placed in the Scripts folder on Auto1111, and used within Auto1111 )
Flowframes software
1. Finding the right resources
there two types of resources you can use leading to different types of animations:
Frames grid LoRAs, very precise on the subject its trained on but tend to be less flexible, the best person to making is type of resource is aDDont 🔞
Weight progressing concept LoRAs, while vary flexible it doesn't cover a wide range of motion, and its precision is bit jittery at times, , the best person to making is type of resource is ntc .
2. Processing into Gif
as we established before we're covering 2 types of animations [Frames Animation] and [Parameter Animation] .
Frames Animation 🎞 :
for this you'll need to get a "Frames grid LoRA" and you'll the Img Slices To Gif script for cutting the generated result.
start by using the LoRA in "txt2img" at full weight in the resolution mention by its creator.the result will look distorted so dont worry.
then "send to img2img", and lower the LoRA to between 0.2-0.4, set the desnoising to between 0.28- 0.4
now can add whatever additional LoRA you want, set the resolution as high as you want (but dont break the aspect ratio).
now select the "Img Slices To Gif" in the script dropdown menu and, Enable, set the parameters based on the "Frames grid LoRA" used, example for 2x3 grid set XSlices=2 & YSlices=3.
Expand the Extra options if want to toggle playing back and forth.
Now Hit Generate ! and your can check the result in "stable-diffusion-webui\outputs\txt2img-images\txt2gif"
Parameter Animation 🎛 :
for this you'll need to get a "Weight progressing concept LoRA" and you'll need the Controlled Parameters Animation script for progressing the LoRA weight .
note that you can also try with this approach with normal LoRAs
now select the "Controlled Parameters Animation" in the script dropdown menu .
choose Parameter Type "LoRA"
add the LoRA Name you want to control, Exmaple for "<lora:MyTestLora_v10 :1>" to I'll add "MyTestLora_v10"
now specify the parameters like the stating Value (value does the LoRA starts moving form), the end Value (value where to LoRA stops progressing), and the step value (how much does to LoRA progresses each frame).
note that you set the LoRA to progress backward by making the stating Value greater then the end Value
lower step value like 0.01 makes for more generated frames and a much smoother transition
now add the inputed parameters by clicking on " Add Parameter Layer"
Expand the Extra options can hit "Estimate Output" to check how many images are going to get generated
you can also toggle playing back and forth by checking "Pingpong".
Now Hit Generate ! and your can check the result in "stable-diffusion-webui\outputs\txt2img-images\txt2gif"
3. Applying interpolation (smoothing)
for this you'll need the Flowframes software installed, when prompted to choose an interpolation model to download just choose the latest RIFE model (RIFE CUDA for NVIDIA).
the model file is a bit large and may fail to download at first, just keep on retrying by going to Setting/ Application/ Manage Downloaded Model Files / Open Model Downloader
Now in the interpolation Tab choose the Ai model that you downloaded,
click on browse Video and load the generated GIF from "stable-diffusion-webui\outputs\txt2img-images\txt2gif"
experiment with the output speed, I mostly use "x3 Speed" with "x2 Slowmo" for smooth 30fps GIFs
and finally set the output format to GIF
you might want to low the quality and color pallet for smaller sizes
Now Hit Interpolate! and you'll find the result in the same Directory as the input