
Seed: -1 – This tells Stable Diffusion to start with a random seed. You probably want to keep it down around 0.2 or 0.3, since too much frame-to-frame change can ruin animation. Denoising Strength: 0.3 – Possibly the most important setting for this project, the denoising scale determines how much Stable Diffusion will change the original image. Increasing it and getting good results requires having a very good prompt. The higher the number, the more strictly Stable Diffusion will try to follow your prompt. CFG Scale: 5 – The CFG scale, in a sense, determines how much creative liberty Stable Diffusion has. You may need more or fewer depending on how fast and how long you want your animation sequence to be. Batch Count: 60 – This is how many images you want to generate. If you don’t know what to use, “Euler a” is an all-around good choice. Sampling Method: DPM++ SDE – This is the same sampling method we used for generating our original image, and we’re sticking with it to ensure a consistent look. Switching to “Only Masked” might speed up generation but may also give you worse results. Inpaint Area: Whole Picture – This forces Stable Diffusion to generate a whole new image for each frame before integrating it with the original image. Otherwise, it will consider the masked content a blank or randomized canvas. Masked Content: Original – This ensures Stable Diffusion will see and take into account the existing image when it’s generating variations. If, for some reason, you want to modify the unmasked part instead, change it to “Inpaint Not Masked.” Mask Mode: Inpaint Masked – This makes sure everything covered gets changed and not the other way around. They can be confusing, so we’ll explain what some of them mean and why you may or may not want to tweak them: But first, you’ll want to make sure img2img has the right settings.
Now that you’ve masked every part of your image you want to see moving, it’s time to generate the frames of our animation. Tip: You can adjust the Inpaint brush size with a slider by clicking the brush button in the top-right corner of the canvas. A practical use could be giving a lifelike ambiance to some RPG artwork: Think flames licking up from a fire, wheels spinning on a car, or water splashing in a fountain.
There are limitations though.īecause img2img makes it easy to generate variations of a particular image, Stable Diffusion lends itself well to quickly crafting a bunch of frames for animations, cyclical ones in particular. While AI-generated film is still a nascent field, it is technically possible to craft some simple animations with Stable Diffusion, either as a GIF or an actual video file.
Step 5: Animate the Frames in a GIF or Video Maker Step 4: Batch Upscale Your Frames (Optional) Step 2: Mask the Parts to Animate With InPaint