Skip to content

wammjis/Animator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Animation Script

A basic img2img script that will dump frames and build a video file. Suitable for creating interesting zoom in warping movies, but not too much else at this time. The basic idea is to story board some kinf od animation with changes in prompts, translation etc at a low framerate until you get it roughly right. Then bump up the framerate for a final render, it should play out roughly the same, just more detail.

Inspired by Deforum Notebook Must have ffmpeg installed in path. This suffers from img2img embossing, if the image is static for too long. I would have to look at someone else's implemetation to figure out why and don't want to steal their code.

Explanation of settings:

Video formats:

Create GIF, webM or MP4 file from the series of images. Regardless, .bat files will be created with the right options to make the videos at a later time.

Total Animation Length (s):

Total number of seconds to create. Will create fps frames for every second, as you'd expect.

Framerate:

Frames per second to generate.

Denoising Strength:

Initial denoising strength value, overrides the value above which is a bit strong for a default. Will be overridden by keyframes when they are hit. Note that denoising is not scaled by fps, like other parameters are.

Denoising Decay:

Experimental option to enable a half-life decay on the denoising strength. Its value is halved every second. Not that useful because of img2img embossing.

Zoom Factor (scale/s):

Initial zoom in (>1) or out (<1), at this rate per second. E.g. 2.0 will double size (and crop) every second. Will be overridden by keyframes when they are hit.

X Pixel Shift (pixels/s):

Shift the image right (+) or left (-) in pixels per second. Will be overridden by keyframes when they are hit.

Y Pixel Shift (pixels/s):

Shift the image down (+) or up (-) in pixels per second. Will be overridden by keyframes when they are hit.

Templates:

Provide common positive and negative prompts for each keyframe below, save typing them out over and over. They will only be applied when a keyframe is hit. The prompts in the keyframes will be appended to these and sent for processing until the next keyframe that has a prompt.

Keyframes:

Format: Time (s) | Desnoise | Zoom (/s) | X Shift (pix/s) | Y shift (pix/s) | Positive Prompts | Negative Prompts | Seed A list of parameter changes to be applied at the specified time.

Example

Start with a nice image rendered from txt2img, with a variety of colours. This will be used to set the colour palette for the animation.

Total Time: 25
FPS: 30
Initial Denoising Strength: 0.4
Initial Zoom factor: 2.0
Initial X Shift: 0
Initial Y Shift: 0
Prompt Template, Positive:
 centred, high detail
Prompt Template, Negative:
KeyFrames:
 0 | 0.4 | 2.5 | 0 | 0 | nice apple, sitting in fruit bowl, open window, blue sky | |
 5 | 0.4 | 1 | 00 | 250 | nice bunch of grapes, grapevine | |
 10 | 0.4 | 1 | 0 | -250 | tabby cat, barn  |  |
 15 | 0.4 | 1 | 250 | 0 | golden retriever, green field |  |
 20 | 0.4 | 1 | -250 | 0 | octopus, ocean |  |

About

Animator script for SD Web UI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages