<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    <title>Visions of Chaos on Reticulated</title>
    <link>https://reticulated.net/tags/visions-of-chaos/</link>
    <description>Recent content in Visions of Chaos on Reticulated</description>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Sun, 25 Sep 2022 11:26:47 -0500</lastBuildDate><atom:link href="https://reticulated.net/tags/visions-of-chaos/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Creating Stable Diffusion Videos with SD Deforum and Visions of Chaos Animation</title>
      <media>https://reticulated.net/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/hero.png</media>
      <link>https://reticulated.net/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/</link>
      <pubDate>Sun, 25 Sep 2022 11:26:47 -0500</pubDate>
      
      <guid>https://reticulated.net/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/</guid>
      <description>It&amp;#39;s now easier than ever to create coherent videos and animations from Stable Diffusion outputs using Deforum SD. Check out instructions to get setup, some examples and tips to get started.</description>
      <content:encoded><![CDATA[<h1 id="animating-stable-diffusion-txt2img-outputs-with-deforum-and-vision-of-chaos">Animating Stable Diffusion txt2img Outputs with Deforum and Vision of Chaos</h1>
<p>If the newness and wow factor of A.I. image generators and Stable Diffusion has worn off for you, deforum animations may be just what you need – While we may not yet be at the point we can scare audiences like the <a href="https://www.youtube.com/watch?v=1dgLEDdFddk">Lumières did with their train video</a> and are probably more in the <a href="https://en.wikipedia.org/wiki/Magic_lantern">Magic Lantern</a> stage of development, I had a ton of fun generating the animations for this article.</p>
<video controls preload="auto" width="100%"  playsinline class="html-video">
        <source src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/Manshort.mp4" type="video/mp4">
      <span></span>
    </video>
<h2 id="deforum-stable-diffusion">Deforum Stable Diffusion</h2>
<p>Deforum somehow creates animations by creating frames that take their ancestors into account. I do not understand this process at all and haven’t seen a ton of information on it. I will update this if I learn more. It looks to be based on <a href="https://github.com/crowsonkb/k-diffusion">this repo</a> and the papers it links to.</p>
<p>There’s a few ways you can run Deforum SD. As of writing this, Deforum is not available in the <a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui">Automatic111</a> repository used in most articles on this site.</p>
<ul>
<li><a href="https://colab.research.google.com/github/deforum/stable-diffusion/blob/main/Deforum_Stable_Diffusion.ipynb">This collab notebook</a></li>
<li><a href="https://github.com/HelixNGC7293/DeforumStableDiffusionLocal">Locally using this repo</a></li>
<li>Using <a href="https://softology.pro/voc.htm">Visions of Chaos</a></li>
<li><a href="https://replicate.com/deforum/deforum_stable_diffusion/examples">This Replicate page</a></li>
</ul>
<p>I’m sure there’s other methods too, but this is what I’ve primarily seen people using. We’ll be using Visions of Chaos here which is easy to setup and can run on your own hardware.</p>
<div class="sib-form" style="text-align: center;
background-color: transparent;                                 ">
<div id="sib-form-container" class="sib-form-container">
<div id="error-message" class="sib-form-message-panel" style="font-size:16px; text-align:left; font-family:&quot;Helvetica&quot;, sans-serif; color:#661d1d; background-color:#ffeded; border-radius:3px; border-color:#ff4949;max-width:540px;">
<div class="sib-form-message-panel__text sib-form-message-panel__text--center">
<svg viewBox="0 0 512 512" class="sib-icon sib-notification__icon">
 <path d="M256 40c118.621 0 216 96.075 216 216 0 119.291-96.61 216-216 216-119.244 0-216-96.562-216-216 0-119.203 96.602-216 216-216m0-32C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm-11.49 120h22.979c6.823 0 12.274 5.682 11.99 12.5l-7 168c-.268 6.428-5.556 11.5-11.99 11.5h-8.979c-6.433 0-11.722-5.073-11.99-11.5l-7-168c-.283-6.818 5.167-12.5 11.99-12.5zM256 340c-15.464 0-28 12.536-28 28s12.536 28 28 28 28-12.536 28-28-12.536-28-28-28z" />
</svg>
<span class="sib-form-message-panel__inner-text">
                 Something went wrong
             </span>
</div>
</div>
<div></div>
<div id="success-message" class="sib-form-message-panel" style="font-size:16px; text-align:left; font-family:&quot;Helvetica&quot;, sans-serif; color:#085229; background-color:#e7faf0; border-radius:3px; border-color:#13ce66;max-width:540px;">
<div class="sib-form-message-panel__text sib-form-message-panel__text--center">
<svg viewBox="0 0 512 512" class="sib-icon sib-notification__icon">
 <path d="M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 464c-118.664 0-216-96.055-216-216 0-118.663 96.055-216 216-216 118.664 0 216 96.055 216 216 0 118.663-96.055 216-216 216zm141.63-274.961L217.15 376.071c-4.705 4.667-12.303 4.637-16.97-.068l-85.878-86.572c-4.667-4.705-4.637-12.303.068-16.97l8.52-8.451c4.705-4.667 12.303-4.637 16.97.068l68.976 69.533 163.441-162.13c4.705-4.667 12.303-4.637 16.97.068l8.451 8.52c4.668 4.705 4.637 12.303-.068 16.97z" />
</svg>
<span class="sib-form-message-panel__inner-text">
                 Success!
             </span>
</div>
</div>
<div></div>
<div id="sib-container" class="sib-container--large sib-container--vertical" style="text-align:center; background-color:rgba(255,255,255,1); max-width:540px; border-radius:3px; border-width:1px; border-color:#C0CCD9; border-style:solid; direction:ltr">
<form id="sib-form" method="POST" action="https://094c12d9.sibforms.com/serve/MUIFALLkvhMwUn1kNvrYTU7uLg8Uixf4tjLkUKWm1529H_FvNi-y7NWuHyYGkbgomOia8-veELP0qJUvWhBUUYNvrVOdf7EVq4UJI4aO8j6qOpFJa2ugPxWMzs_IOKNn_uvU9JqFQe-eCkyH4xLEv9S8Djswo6lQm9wGs2PDqBPNKY5GwLCT7SMZ-UCLbRzcMNAbv5GkaciXYWPz" data-type="subscription">
<div style="padding: 8px 0;">
 <div class="sib-form-block" style="font-size:32px; text-align:left; font-weight:700; font-family:&quot;Futura&quot;, sans-serif; color:#3C4858; background-color:transparent; text-align:left">
   <p>Subscribe for post alerts!</p>
 </div>
</div>
<div style="padding: 8px 0;">
 <div class="sib-form-block" style="font-size:16px; text-align:left; font-family:&quot;Futura&quot;, sans-serif; color:#3C4858; background-color:transparent; text-align:left">
   <div class="sib-text-form-block">
     <p>Sign-up for the latest <strong>Reticulated.net</strong> posts below</p>
   </div>
 </div>
</div>
<div style="padding: 8px 0;">
 <div class="sib-input sib-form-block">
   <div class="form__entry entry_block">
     <div class="form__label-row ">

       <div class="entry__field">
         <input class="input " type="text" id="EMAIL" name="EMAIL" autocomplete="off" placeholder="EMAIL" data-required="true" required />
       </div>
     </div>

     <label class="entry__error entry__error--primary" style="font-size:16px; text-align:left; font-family:&quot;Helvetica&quot;, sans-serif; color:#661d1d; background-color:#ffeded; border-radius:3px; border-color:#ff4949;">
     </label>
     <label class="entry__specification" style="font-size:12px; text-align:left; font-family:&quot;Futura&quot;, sans-serif; color:#8390A4; text-align:left">
       Provide your email address to subscribe. For e.g abc@xyz.com
     </label>
   </div>
 </div>
</div>
<div style="padding: 8px 0;">
 <div class="sib-form-block" style="text-align: left">
   <button class="sib-form-block__button sib-form-block__button-with-loader" style="font-size:16px; text-align:left; font-weight:700; font-family:&quot;Futura&quot;, sans-serif; color:#FFFFFF; background-color:#0c0e12; border-radius:6px; border-width:0px;" form="sib-form" type="submit">
     <svg class="icon clickable__icon progress-indicator__icon sib-hide-loader-icon" viewBox="0 0 512 512">
       <path d="M460.116 373.846l-20.823-12.022c-5.541-3.199-7.54-10.159-4.663-15.874 30.137-59.886 28.343-131.652-5.386-189.946-33.641-58.394-94.896-95.833-161.827-99.676C261.028 55.961 256 50.751 256 44.352V20.309c0-6.904 5.808-12.337 12.703-11.982 83.556 4.306 160.163 50.864 202.11 123.677 42.063 72.696 44.079 162.316 6.031 236.832-3.14 6.148-10.75 8.461-16.728 5.01z" />
     </svg>
     SUBSCRIBE
   </button>
 </div>
</div>

<input type="text" name="email_address_check" value="" class="input--hidden">
<input type="hidden" name="locale" value="en">
</form>
</div>
</div>
</div>
<h3 id="resources-and-help">Resources and Help</h3>
<p>I’ll share some tips around workflows I learned doing some testing, but the best resource I have found to explain the <em>plethora</em> of options in Deforum is <a href="https://dreamingcomputers.com/deforum-stable-diffusion/deforum-stable-diffusion-settings/">Deforum Stable Diffusion Settings</a>. If you’re getting weird results or don’t understand what an option is, check this guide.</p>
<p>There’s also <a href="https://docs.google.com/document/d/13vVTpPZb9fUPzRFtqTXcAmBqm10tE6l039lF1LyItKg/edit">this Google Doc</a> that may be useful.</p>
<p><a href="https://deforum.github.io/">Check here</a> for other resources and a link the the official Discord server for even more help.</p>
<h2 id="visions-of-chaos">Visions of Chaos</h2>
<p>If you’ve heard of VOC, it’s probably as a fractal/generative art making program. They have recently spent a lot of time putting diffusion models in the application and it is awesome and super easy to use. I especially find it useful swapping between post processing tools and models. It’s an awesome piece of software and you should definitely check out what else it can do with its other (non machine learning) modes.</p>
<video controls preload="auto" width="100%"  playsinline class="html-video">
        <source src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/Trip.mp4" type="video/mp4">
      <span></span>
    </video>
<p>As I write this, I got an update notification they released the Automatic111 webui to VOC. If they keep that up to date reasonably, I will probably switch over to that for ease of use.</p>
<p>You need to enable machine learning in settings and <a href="https://softology.pro/tutorials/tensorflow/tensorflow.htm">by following this guide</a> to use the SD and other AI features.</p>
<p>Once you do that, you just need to select text to image from the menu:</p>
<p><img loading="lazy" src="img/image-20220925131251909.png#centered" alt="image-20220925131251909"  />
</p>
<p>Then under <code>Script</code>, select <code>Deforum Stable Diffusion v0.4</code> and you’re ready to go.</p>
<h3 id="getting-started">Getting Started</h3>
<p>The settings are a little confusing to navigate. I won’t walk through everything here but here’s a quick walkthrough to get started.</p>
<p><img loading="lazy" src="img/image-20220925134643427.png#centered" alt="image-20220925134643427"  />
</p>
<p><strong>Prompt</strong> - The prompt screen here is not used in animation mode. Use this if you want to test seeds/images when building your animation prompt</p>
<p><strong>Super Resolution</strong> - Use this to upscale your images. This <em>will</em> apply to all animation frames if checked.</p>
<p><strong>Iterations</strong> - This applies to all frames but you will notice many frames will not take this many steps, assumedly due to how the model works.</p>
<p><strong>Auto save TTI parameter file</strong> - I have not used this but if you want to share / recreate your videos, select this to auto save all params.</p>
<p>All other relevant settings are in <code>Deforum Stable Diffusion v0.4 Settings</code></p>
<p><img loading="lazy" src="img/image-20220925135230560.png#centered" alt="image-20220925135230560"  />
</p>
<p><strong>Animation Mode</strong> - If recreating examples below, use <code>3d</code></p>
<p><strong>Sampler</strong> - I would use the default setting here unless you use <code>euler_a</code>, which may actually produce different results instead of just being slower.</p>
<p><strong>Seed behavior</strong> - Since we’re using 3d animation mode, this needs to be set to random or iter not fixed. Fixed will create bloomed geometric animations.</p>
<p><strong>Prompts</strong> - The prompts here do not matter for 3d animation mode from what I can see.</p>
<p>Continue to the animation tab.</p>
<p><img loading="lazy" src="img/image-20220925135852738.png#centered" alt="image-20220925135852738"  />
</p>
<p><strong>Use custom animation prompts</strong> - Here is finally where we enter our prompt. An example prompt is provided. The numbers are the frames/images that will be generated. Keep in mind the model will try to ‘reach’ the prompt image in the steps it has in-between prompts. If you give it more steps, it will have more time to mutate the image.</p>
<p><strong>Movement Maker</strong> you make your prompts, click movement maker and either modify or accept the default settings. The # <code>Key Frames</code> are the # of prompts you have. You may want to change <code>translation_z</code> schedule for zooming in/out.</p>
<p>Now close the settings and hit generate and your frames should start being created. Once everything is done, ffmpeg will launch automatically to create your video.</p>
<h4 id="tips">Tips</h4>
<ul>
<li>In 3D mode, the <code>translation_z</code> parameter is the zoom schedule and will not be set by movement maker.</li>
<li>Read over the FOV and translations sections <a href="https://dreamingcomputers.com/deforum-stable-diffusion/deforum-stable-diffusion-settings/">in this guide</a></li>
<li>Use lower values in strength schedule for bigger changes in images.
<ul>
<li>In extreme cases you may try using <em>very low</em> strength values for 1-5 frames to dramatically change the image before returning to a normal strength.</li>
<li>Example (prompts change at 60 and 120): <code>0:(0.75),60:(0.5),62:(0.75),120(.55),124(.75)</code>…</li>
</ul>
</li>
<li>Extend video length using <a href="https://github.com/google-research/frame-interpolation">FILM</a>, <a href="https://github.com/baowenbo/DAIN">DAIN</a>, or <a href="https://github.com/megvii-research/ECCV2022-RIFE">RIFE</a> in the Movie Interpolation menu after you generate the initial video. This can help you keep processing times down. FILM and DAIN have both produced good results for me. They all have different use cases, so check out each one.
<ul>
<li>If you make your video too long with interpolation, use <a href="https://ffmpeg.org/download.html">ffmpeg</a> to double the frame rate (hopefully you started at 30fps)</li>
</ul>
</li>
<li>If you’re running out of VRAM, see the <code>VRAM offloading</code> setting in the Deforum settings menu. You can also try smaller images using the custom image size dialog.
<ul>
<li>If you have to scale down your images (or even if you don’t), you can use the upscaler in the main text to image dialog and it will apply to all your frames.</li>
</ul>
</li>
</ul>
<h2 id="examples">Examples</h2>
<p>All of these were made in 3d mode. I have not yet experimented with 2d mode.</p>
<h3 id="anatomy">Anatomy</h3>
<p>This example I spent the most time on. Instead of just playing around with random ideas/prompts I tried to create a video I imagined in my mind. You can get the idea from the prompt below.</p>
<p>This example uses an advanced strength schedule referenced above in the tips, where creating the lung, heart and universe were given 40-55% strength values for 1-4 frames to encourage more dramatic transitions.</p>
<p>I also tried setting the prompt schedule to have duplicate prompts to encourage the model to ‘rush’ to a complete version of an object, and then continue fleshing out the idea for several more frames. This worked less well in my experience, but may be part of an ideal workflow – I don’t feel I’ve done enough testing to rule it out.</p>
<video controls preload="auto" width="100%"  playsinline class="html-video">
        <source src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/Anatomy.mp4" type="video/mp4">
      <span></span>
    </video>
<h3 id="frog">Frog</h3>
<p>Probably the best result I had just randomly playing around. The movement maker settings are default. In this example and the one above, it seems like it would be useful to be able to specify x,y coordinates somehow where the prompt should be rendered, but I imagine that is pretty hard to pull out of a diffusion model in advance. You can likely solve this through camera work most easily.</p>
<video controls preload="auto" width="100%"  playsinline class="html-video">
        <source src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/Frog.mp4" type="video/mp4">
      <span></span>
    </video>
<h3 id="a-man-a-plan-a-canal-panama">A Man a Plan a Canal Panama</h3>
<p>This was one of my first generations and made with mostly default settings, including all the default movement maker settings. Though the initial image may be odd the results are pretty interesting, though not totally coherent.</p>
<video controls preload="auto" width="100%"  playsinline class="html-video">
        <source src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/Manshort.mp4" type="video/mp4">
      <span></span>
    </video>
<h3 id="short-giflike">Short GIF(like)</h3>
<p>I did not have great results with this but I think it could work very well if you spent some time and had the right seed range that didn’t have excessive variations. I actually created this accidentally canceling a longer generation and deciding to generate the video.</p>
<p>Notice the yellow flashing in one of the frames and how that breaks whatever illusion there would be. I think <a href="https://reticulated.net/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/">prompt editing</a> instead of completely different prompts may do wonders here. I tested this at the end of this article.</p>
<video controls preload="auto" width="100%"  playsinline class="html-video">
        <source src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/Castle.mp4" type="video/mp4">
      <span></span>
    </video>
<h3 id="postprocessing">Postprocessing</h3>
<p>Built into VOC is a few movie interpolation models. All the above examples use one or a combination of these. Without the interpolation, processing time is long and reasonable fps create jerky videos in most cases I saw. Below are examples of this video processed with the different models.</p>
<video controls preload="auto" width="100%"  playsinline class="html-video">
        <source src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/Goatrife.mp4" type="video/mp4">
      <span></span>
    </video>
<h4 id="dain">DAIN</h4>
<video controls preload="auto" width="100%"  playsinline class="html-video">
        <source src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/Goatdain.mp4" type="video/mp4">
      <span></span>
    </video>
<h4 id="film">FILM</h4>
<video controls preload="auto" width="100%"  playsinline class="html-video">
        <source src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/Goatfilm.mp4" type="video/mp4">
      <span></span>
    </video>
<h4 id="rife">RIFE</h4>
<video controls preload="auto" width="100%"  playsinline class="html-video">
        <source src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/Goatrife.mp4" type="video/mp4">
      <span></span>
    </video>
<h2 id="initial-thoughts">Initial Thoughts</h2>
<p>This seems super powerful and as I said before really delivers that wow factor again like the first time you generated a made up idea you had into an image. It doesn’t seem sufficient for really making videos and once you know what these videos look like, it’s pretty obvious when you see a video made with this process.</p>
<p>After glancing at the paper, the main takeaway seems to be the speed at which these generate. Again, I don’t really understand yet how this is all working, but I do notice the iterations seem to vary wildly frame to frame and depend on the amount of ‘changing’ you’re applying via the strength/prompt schedules.</p>
<p>I think all of my initial tests were a little too ambitious too and if you tried to make something like a moving photo all the modern mobile OSs make now, you may have better results. I also wonder what outpainting built into this kind of model could do – especially if it could be contextually aware of other frame expansions.</p>
<p>At this pace, it looks like in 6 months we’ll have on demand feature length films from simple prompts – and <em>somehow</em> maybe we’ll even get to keep some open source options too.</p>
<p>That’s all for now.</p>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
