{"id":553789,"date":"2023-02-17T16:00:26","date_gmt":"2023-02-17T13:00:26","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/"},"modified":"2023-02-17T16:00:26","modified_gmt":"2023-02-17T13:00:26","slug":"how-to-use-stable-diffusion-to-make-ai-gifs-and-videos","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/","title":{"rendered":"#How to Use Stable Diffusion to Make AI GIFs and Videos"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a3bb9bf6ae0c\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a3bb9bf6ae0c\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#%E2%80%9CHow_to_Use_Stable_Diffusion_to_Make_AI_GIFs_and_Videos%E2%80%9D\" >&#8220;How to Use Stable Diffusion to Make AI GIFs and Videos&#8221;<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#Stable_Diffusion_Can_Generate_Video\" >Stable Diffusion Can Generate Video?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#Animate_an_Image_Using_Inpaint\" >Animate an Image Using Inpaint<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#Step_1_Get_an_Image_and_Its_Prompt\" >Step 1: Get an Image and Its Prompt<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#Step_2_Mask_the_Parts_to_Animate_With_InPaint\" >Step 2: Mask the Parts to Animate With InPaint<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#Step_3_Generate_Your_Frames\" >Step 3: Generate Your Frames<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#Step_4_Batch_Upscale_Your_Frames_Optional\" >Step 4: Batch Upscale Your Frames (Optional)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#Step_5_Animate_the_Frames_in_a_GIF_or_Video_Maker\" >Step 5: Animate the Frames in a GIF or Video Maker<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#Generate_a_Video_Using_Deforum\" >Generate a Video Using Deforum<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#Step_1_Install_the_Deforum_Extension\" >Step 1: Install the Deforum Extension<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#Step_2_Write_Your_Prompts\" >Step 2: Write Your Prompts<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#Step_3_Adjust_Deforum_Settings\" >Step 3: Adjust Deforum Settings<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/#Step_4_Generate_Your_Video\" >Step 4: Generate Your Video<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"%E2%80%9CHow_to_Use_Stable_Diffusion_to_Make_AI_GIFs_and_Videos%E2%80%9D\"><\/span>&#8220;How to Use Stable Diffusion to Make AI GIFs and Videos&#8221;<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<div>\n<figure style=\"width: 1920px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage size-full wp-image-873409\" data-pagespeed-no-defer=\"\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/camera.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"A video camera, as illustrated by Stable Diffusion.\" width=\"1920\" height=\"1080\"\/><figcaption class=\"wp-caption-text\"><span class=\"type:primaryImage imagecredit\">Stable Diffusion<\/span><\/figcaption><\/figure>\n<p>To make an animation using Stable Diffusion web UI, use Inpaint to mask what you want to move and then generate variations, then import them into a GIF or video maker. Alternatively, install the Deforum extension to generate animations from scratch.<\/p>\n<p>Stable Diffusion is capable of generating more than just still images. With some built-in tools and a special extension, you can get very cool AI video without much effort. Here\u2019s how to generate frames for an animated GIF or an actual video file with Stable Diffusion.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Stable_Diffusion_Can_Generate_Video\"><\/span>Stable Diffusion Can Generate Video?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>While <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/837032\/would-you-watch-a-movie-generated-by-an-ai-you-might-have-to\/\">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. There are limitations though.<\/p>\n<p>Because 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. Think flames licking up from a fire, wheels spinning on a car, or water splashing in a fountain. A practical use could be giving a lifelike ambiance to some RPG artwork:<br \/>\n<video autoplay=\"autoplay\" loop=\"true\" muted=\"\" controls=\"\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/hearth-slow.gif?format=mp4\" title=\"Animated digital illustration of a hearth in cottage.\" width=\"512\" height=\"512\"\/><br \/><span class=\"imagecredit\">Stable Diffusion<\/span><br \/>\nYou can even make videos based on real images instead of synthetic ones. Here I took a photo of a plant being watered and, with a few clicks, animated the water stream:<br \/>\n<video autoplay=\"autoplay\" loop=\"true\" muted=\"\" controls=\"\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/plant-animation.gif?format=mp4\" title=\"Animated image of water being poured into a potted plant.\" width=\"512\" height=\"512\"\/><br \/><span class=\"imagecredit\">Jordan Gloor \/ Stable Diffusion<\/span><br \/>\nIf you want to animate an object so that it moves from point A to point B, that\u2019s a tall order for Stable Diffusion (at least for now). You\u2019d likely be spending a lot of time tweaking prompts and settings, then poring over a ton of output to find the best frames and placing them in correct order. At that point, you might as well break out Adobe Illustrator and just start animating by hand.<\/p>\n<p>Despite that, you can make some cool, simple animations with a basic Stable Diffusion setup and another tool of your choice for stitching the frames together in an animation. There\u2019s also a project called Deforum that uses Stable Diffusion to create \u201cmorphing\u201d animations that look pretty interesting. It\u2019ll spit out an MP4 video, so no external tools are required, and it even lets you add audio. We\u2019ll show you the basics of both methods.<\/p>\n<blockquote class=\"admonishment_note\"><p><strong>Note:<\/strong> For the purpose of this article, we\u2019re going to assume you\u2019ve already installed a graphical interface for Stable Diffusion, specifically\u00a0<a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/github.com\/AUTOMATIC1111\/stable-diffusion-webui\">AUTOMATIC1111\u2019s Stable Diffusion web UI<\/a>. Compared to the standard command line install, it makes generating images way easier and comes with a ton of handy tools and extras.<\/p><\/blockquote>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Animate_an_Image_Using_Inpaint\"><\/span>Animate an Image Using Inpaint<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Using the img2img tool Inpaint, you can highlight the part of an image you want to animate and generate several variations of it. Then you\u2019ll drop them into a GIF or video maker and save the frames as an animation.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_1_Get_an_Image_and_Its_Prompt\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_2\">Step 1: Get an Image and Its Prompt<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Start by dropping an image you want to animate into the Inpaint tab of the img2img tool. If you don\u2019t have one generated already, take some time <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/833169\/how-to-write-an-awesome-stable-diffusion-prompt\/\">writing a good prompt so you get a good starter photo. You could also import an image you\u2019ve photographed or drawn yourself.<\/p>\n<p>If you\u2019re importing an image that you didn\u2019t generate with Stable Diffusion, you\u2019ll still need an appropriate prompt for generating variations, so click \u201cInterrogate CLIP\u201d at the top of the Img2Img page. That will generate a starter prompt based on what Stable Diffusion <em>thinks<\/em> your image contains. Complete the prompt by adding any other important details.<\/p>\n<p>For our guide, we\u2019ve generated a 512\u00d7512 image of a robot under a night sky that we want to give a time-lapse sort of animation, with shooting stars and galaxies passing by.<\/p>\n<figure style=\"width: 512px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-873343\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/robot1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"A robot standing in a field under a starry sky.\" width=\"512\" height=\"512\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><figcaption class=\"wp-caption-text\"><span class=\"imagecredit\">Stable Diffusion<\/span><\/figcaption><\/figure>\n<p>If you want to follow along precisely, you can recreate it with the prompt we used:<\/p>\n<pre>a robot stands in a field looking up at the night sky during a meteor shower, shooting stars, galaxies, the cosmos, milky way, ultra realistic, highly detailed, 4k uhd<\/pre>\n<p>And these are the settings we used:<\/p>\n<div class=\"greybox_callout_borderonly\">\n<strong>Checkpoint:<\/strong> Stable Diffusion 2.0<\/p>\n<p><strong>Sampling Method:<\/strong> DPM++ SDE<\/p>\n<p><strong>Sampling Steps:<\/strong> 20<\/p>\n<p><strong>CFG Scale:<\/strong> 5<\/p>\n<p><strong>Seed:<\/strong>\u00a04177542269\n<\/div>\n<h3><span class=\"ez-toc-section\" id=\"Step_2_Mask_the_Parts_to_Animate_With_InPaint\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_3\">Step 2: Mask the Parts to Animate With InPaint<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>With your image and prompt in place, in the Inpaint tool, use the paintbrush to mask (cover up) every part of the image you want to animate. Leave uncovered anything you want static.<\/p>\n<p>In our example, we\u2019re covering most of the sky. We left a bit of cushion around the robot because in our testing, if we got too close, Stable Diffusion would sometimes add antennae and other appendages to the robot.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873196\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/robot1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Use the Inpaint brush to cover every part of the image you want to see animated.\" width=\"727\" height=\"474\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<blockquote class=\"admonishment_tip\"><p><strong>Tip:<\/strong> You can adjust the Inpaint brush size with a slider by clicking the brush button in the top-right corner of the canvas.<\/p><\/blockquote>\n<h3><span class=\"ez-toc-section\" id=\"Step_3_Generate_Your_Frames\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_4\">Step 3: Generate Your Frames<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Now that you\u2019ve masked every part of your image you want to see moving, it\u2019s time to generate the frames of our animation. But first, you\u2019ll want to make sure img2img has the right settings. They can be confusing, so we\u2019ll explain what some of them mean and why you may or may not want to tweak them:<\/p>\n<ul>\n<li><strong>Mask Mode: Inpaint Masked<\/strong> \u2013 This makes sure everything covered gets changed and not the other way around. If, for some reason, you want to modify the unmasked part instead, change it to \u201cInpaint Not Masked.\u201d<\/li>\n<li><strong>Masked Content: Original<\/strong> \u2013 This ensures Stable Diffusion will see and take into account the existing image when it\u2019s generating variations. Otherwise, it will consider the masked content a blank or randomized canvas.<\/li>\n<li><strong>Inpaint Area: Whole Picture<\/strong> \u2013 This forces Stable Diffusion to generate a whole new image for each frame before integrating it with the original image. Switching to \u201cOnly Masked\u201d might speed up generation but may also give you worse results.<\/li>\n<li><strong>Sampling Method: DPM++ SDE<\/strong> \u2013 This is the same sampling method we used for generating our original image, and we\u2019re sticking with it to ensure a consistent look. If you don\u2019t know what to use, \u201cEuler a\u201d is an all-around good choice.<\/li>\n<li><strong>Batch Count: 60<\/strong> \u2013 This is how many images you want to generate. You may need more or fewer depending on how fast and how long you want your animation sequence to be.<\/li>\n<li><strong>CFG Scale: 5<\/strong> \u2013 The CFG scale, in a sense, determines how much creative liberty Stable Diffusion has. The higher the number, the more strictly Stable Diffusion will try to follow your prompt. Increasing it and getting good results requires having a very good prompt.<\/li>\n<li><strong>Denoising Strength: 0.3<\/strong> \u2013 Possibly the most important setting for this project, the denoising scale determines how much Stable Diffusion will change the original image. You probably want to keep it down around 0.2 or 0.3, since too much frame-to-frame change can ruin animation.<\/li>\n<li><strong>Seed: -1<\/strong> \u2013 This tells Stable Diffusion to start with a random seed. We don\u2019t recommend reusing the seed from your original image, since that reduces the amount of variation you\u2019ll get (if any at all).<\/li>\n<\/ul>\n<p>With all of your settings in place, click \u201cGenerate\u201d and sit back while Stable Diffusion draws your animation frames for you. You\u2019ll find them in the <code>\/outputs\/img2img-images<\/code> folder of your Stable Diffusion directory. If you don\u2019t like the results, tweak the settings (probably starting with denoising strength and sampling steps) and try again.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_4_Batch_Upscale_Your_Frames_Optional\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_5\">Step 4: Batch Upscale Your Frames (Optional)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If you plan to create a high-definition video, remember to upscale all your newly generated frames to the resolution you want. Click \u201cSend to Extras\u201d to get started.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873197\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/robot2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"557\" height=\"314\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Inside Extras, switch to the \u201cBatch Process\u201d tab.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873202\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/robot4.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"810\" height=\"456\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Adjust the \u201cResize\u201d scale to the number of times you want it resized (setting to 2 will change 512\u00d7512 images into 1024\u00d71024 images). Alternatively, switch from \u201cScale by\u201d to \u201cScale to\u201d and set a specific resolution. Also set \u201cUpscaler 1\u201d to the upscaler of your choice. We had good enough results with R-ESRGAN 4x+, but feel free to experiment to see which handles your images best.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873207\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/robot5.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"792\" height=\"445\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Then hit \u201cGenerate\u201d and Stable Diffusion will give you a higher-resolution version of each frame, saved in your <code>\/outputs\/extras<\/code> folder.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_5_Animate_the_Frames_in_a_GIF_or_Video_Maker\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_6\">Step 5: Animate the Frames in a GIF or Video Maker<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Now that you\u2019ve got your frames, it\u2019s time to stitch them all together and create your final animation. There are many tools you can do this with, including free dedicated websites like <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/ezgif.com\/maker\">Ezgif<\/a> and <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/flixier.com\/tools\/gif-maker\">flixier<\/a> that are easy to use and have a lot of fine-tuning controls. However, remember that those websites can see everything you upload, so don\u2019t give them anything you aren\u2019t comfortable with the world knowing about.<\/p>\n<p>While those websites are pretty self-explanatory, we\u2019ll be demonstrating how you use a free offline photo editing tool, <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.gimp.org\/\">GIMP<\/a>, to make a GIF. If you want a video file, use <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/kdenlive.org\/en\/\">Kdenlive<\/a> or a similar video editor instead\u2014just make sure you tweak the settings so all your frames get imported as clips that are one second or shorter, depending on many frames per second you want.<\/p>\n<p>To begin, <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.gimp.org\/downloads\/\">download GIMP<\/a> and install it on your computer if you haven\u2019t already. Launch it, then go to File &gt; Open as Layers.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873218\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/robot6.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"356\" height=\"200\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Find where the frames you generated are and select all of them at once before clicking \u201cOpen.\u201d (Hold the Shift key to select multiple files quickly.) GIMP will import all of your images as a separate layer on one canvas. We want this because the way GIMP\u2019s GIF generation works is by going through every layer from bottom to top, treating each consecutive layer as the next frame in the animation.<\/p>\n<p>Now\u2019s the fun part. To watch a preview of your GIF, go to Filters &gt; Animation &gt; Playback.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873219\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/robot7.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"651\" height=\"366\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Press the spacebar to play and pause the GIF. If frames go by too fast or slow, adjust the FPS at the bottom of the playback dialog, and click the refresh button at the top to reload the preview with the new frame rate.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873226\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/robot8.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1138\" height=\"640\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Once the animation looks good to you, it\u2019s time to generate the GIF file. Close the preview and click File &gt; Export As. When you type in the file save name, add the\u00a0<code>.gif<\/code>\u00a0extension to the end so that GIMP knows you want a GIF.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873349\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/robot10.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Add &quot;.gif&quot; to the file name when exporting in GIMP.\" width=\"255\" height=\"55\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>In the GIF export dialog box that appears, make sure the \u201cAs Animation\u201d box is checked. Adjust the number of milliseconds between frames too if you want a different frame rate. There are 1000 milliseconds in a second, so 100 will get you right around 10 FPS. Finally, click \u201cExport.\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873353\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/robot11.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"513\" height=\"288\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Boom, you\u2019ve got your complete animated GIF.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Generate_a_Video_Using_Deforum\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_7\">Generate a Video Using Deforum<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you want to want to create more interesting animations with Stable Diffusion, and have it output video files instead of just a bunch of frames for you to work with, use <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/deforum.github.io\/\">Deforum<\/a>. It\u2019s an image synthesis project with an extension available for Stable Diffusion web UI that lets you direct and generate MP4 video files, even with audio. It\u2019s a very powerful and complex tool with a lot of settings to experiment with, including camera pans and zooms, multiple prompts, and video import.<\/p>\n<p>For our purposes, we\u2019ll just introduce you to the basics of generating a fairly simple but interesting animation.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_1_Install_the_Deforum_Extension\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_8\">Step 1: Install the Deforum Extension<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To get <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/github.com\/deforum-art\/deforum-for-automatic1111-webui\">the Deforum extension<\/a>, open a command prompt and change directories\u00a0to your <code>stable-diffusion-web-ui<\/code> folder. Then use this git clone command to install Deforum in your extensions folder use.<\/p>\n<pre>git clone https:\/\/github.com\/deforum-art\/deforum-for-automatic1111-webui extensions\/deforum<\/pre>\n<p>Launch Stable Diffusion web UI as normal, and open the Deforum tab that\u2019s now in your interface.<\/p>\n<blockquote class=\"admonishment_tip\"><p><strong>Tip:<\/strong> The Deforum extension comes ready with defaults in place so you can immediately hit the \u201cGenerate\u201d button to create a video of a rabbit morphing into a cat, then a coconut, then a durian. Pretty cool!<\/p><\/blockquote>\n<h3><span class=\"ez-toc-section\" id=\"Step_2_Write_Your_Prompts\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_9\">Step 2: Write Your Prompts<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You might be used to writing individual prompts with Stable Diffusion, but Deforum lets you write <em>multiple<\/em> prompts that are \u201cscheduled,\u201d meaning at whatever point in the animation you choose it will switch to generating frames based on the next prompt in the schedule.<\/p>\n<p>Click the \u201cPrompts\u201d tab and change the existing prompts to whatever you want, keeping the bracket and tab structure in place. For our example, we\u2019ll use this set of prompts:<\/p>\n<pre>{&#13;\n    \"0\": \"a robot stands under the night sky during a meteor shower, shooting stars, galaxies, the cosmos, milky way, ultra realistic, highly detailed, 4k uhd\",&#13;\n    \"40\": \"a space station flies through space during a meteor shower, ultra realistic, highly detailed\",&#13;\n    \"80\": \"a supernova explodes, vibrant colors, ultra realistic, highly detailed\"&#13;\n}<\/pre>\n<p>So what do those numbers mean? By default Deforum generates 120 frames for your animation, and we\u2019re dividing that set of frames into three parts. <code>0<\/code> signifies the first frame, so it and all frames after it will be im2img variations of the first prompt. Then at frame 40, Stable Diffusion will start making variations based on our second prompt. At 80, it switches to the third. You can add as many prompt changes as you want and adjust the max frame limit on the Keyframes tab as needed.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_3_Adjust_Deforum_Settings\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_10\">Step 3: Adjust Deforum Settings<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You\u2019ve probably already noticed there are a ton of settings involved in Deforum, but we\u2019ll walk through a few to get you started. First, in the \u201cRun\u201d tab, you\u2019ll find many of your typical Stable Diffusion settings. Rename the batch, enter the seed you want to start with (we\u2019re reusing the one for our robot), and change the sampler to the one you want.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873400\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/deforum1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"In the &quot;Run&quot; tab change the sampler, seed, and batch name to your preferred settings.\" width=\"757\" height=\"426\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>In the Keyframes tab you can adjust the motion of the \u201ccamera\u201d for the animation. It\u2019s set by default to zoom at intervals, but we want to add a vertical \u201cpan\u201d movement, so we\u2019ll add <code>0:(-2), 100:(4)<\/code>to the \u201cTranslation Y\u201d frame. That tells Deforum to treat the first frame as being at pixel -2 on the Y axis, then by frame 100 move to pixel 4. That will give us a slight pan upward as the animation progresses.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873405\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/deforum3.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Enter values in the &quot;Translation Y&quot; field if you want the animation view to change vertically.\" width=\"722\" height=\"406\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>In the Output tab, we\u2019ll check the \u201cMake GIF\u201d box which will give us a GIF file in addition to the MPEG video file. This is also where you\u2019d add audio with the \u201cAdd Soundtrack\u201d and \u201cSoundtrack Path\u201d settings, if you have some.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873404\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/deforum2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"In the Output tab, check the &quot;Make GIF&quot; box if you want a GIF file.\" width=\"749\" height=\"421\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_4_Generate_Your_Video\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_11\">Step 4: Generate Your Video<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Finally, hit that big \u201cGenerate\u201d button. Since Deforum is creating and stitching many frames, this will take time, so grab some coffee while you wait. When it\u2019s complete, you\u2019ll find the MPEG file, the GIF version, plus every individual frame and a readout of the settings you used under the batch name in your <code>\/outputs\/img2img-images<\/code> directory.<\/p>\n<p>Here\u2019s what our prompt got us:<\/p>\n<p>It\u2019s no summer blockbuster, but it\u2019s still kind of mesmerizing! Check out <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/redirect.viglink.com\/?key=e7eab128eb8d1c53e14db14f4c632447&amp;u=https%3A%2F%2Fdocs.google.com%2Fdocument%2Fd%2F1RrQv7FntzOuLg4ohjRZPVL7iptIyBhwwbcEYEW2OfcI%2Fedit&amp;cuid=xid:{xid}&amp;___trxnet=vg\">the official Deforum quick start guide<\/a> to learn about all the other knobs and dials you can adjust.<\/p>\n<hr\/>\n<p>If you\u2019re looking for other cool AI projects, learn how to generate Minecraft texture packs with Stable Diffusion\u00a0or\u00a0get started with ChatGPT, plus\u00a0the surprising things you can do with ChatGPT.<\/p>\n<\/div>\n<p><script>\n setTimeout(function(){\n  !function(f,b,e,v,n,t,s)\n  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n  n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n  n.queue=[];t=b.createElement(e);t.async=!0;\n  t.src=v;s=b.getElementsByTagName(e)[0];\n  s.parentNode.insertBefore(t,s) } (window, document,'script',\n  'https:\/\/connect.facebook.net\/en_US\/fbevents.js');\n   fbq('init', '335401813750447');\n   fbq('track', 'PageView');\n  },3000);\n<\/script><\/p>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.howtogeek.com\/872921\/how-to-use-stable-diffusion-to-make-ai-gifs-and-videos\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;How to Use Stable Diffusion to Make AI GIFs and Videos&#8221; Stable Diffusion To make an animation using Stable Diffusion web UI, use Inpaint to mask what you want to move and then generate variations, then import them into a GIF or video maker. Alternatively, install the Deforum extension to generate animations from scratch. Stable&#8230;<\/p>\n","protected":false},"author":1,"featured_media":553790,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/02\/camera.png?height=200p&trim=2,2,2,2","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-553789","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/553789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=553789"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/553789\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/553790"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=553789"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=553789"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=553789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}