<?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>CUDA on Reticulated</title>
    <link>https://reticulated.net/tags/cuda/</link>
    <description>Recent content in CUDA on Reticulated</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Sun, 25 Sep 2022 11:26:47 -0500</lastBuildDate><atom:link href="https://reticulated.net/tags/cuda/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 src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/image-20220925131251909_hu981ede6aeb285c3a6b47bd2f1135d356_74682_1103x0_resize_q82_h2_lanczos_3.webp#centered" srcset="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/image-20220925131251909_hu981ede6aeb285c3a6b47bd2f1135d356_74682_720x0_resize_q82_h2_lanczos_3.webp#centered 720w, /dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/image-20220925131251909_hu981ede6aeb285c3a6b47bd2f1135d356_74682_1080x0_resize_q82_h2_lanczos_3.webp#centered 1080w, /dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/image-20220925131251909_hu981ede6aeb285c3a6b47bd2f1135d356_74682_1103x0_resize_q82_h2_lanczos_3.webp#centered 1103w" sizes="(min-width: 768px) 720px, 100vw"
    width="1103" height="894"
    alt="image-20220925131251909"
     class="responsive-image"
    loading="lazy" decoding="async"></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 src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/image-20220925134643427_hu07426beb3d1bd5a30ed0a5d314312f3f_26627_780x0_resize_q82_h2_lanczos_3.webp#centered" srcset="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/image-20220925134643427_hu07426beb3d1bd5a30ed0a5d314312f3f_26627_720x0_resize_q82_h2_lanczos_3.webp#centered 720w, /dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/image-20220925134643427_hu07426beb3d1bd5a30ed0a5d314312f3f_26627_780x0_resize_q82_h2_lanczos_3.webp#centered 780w" sizes="(min-width: 768px) 720px, 100vw"
    width="780" height="677"
    alt="image-20220925134643427"
     class="responsive-image"
    loading="lazy" decoding="async"></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 src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/image-20220925135230560_hu673712a87fab98b249a9be437b1c8c09_46858_977x0_resize_q82_h2_lanczos_3.webp#centered" srcset="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/image-20220925135230560_hu673712a87fab98b249a9be437b1c8c09_46858_720x0_resize_q82_h2_lanczos_3.webp#centered 720w, /dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/image-20220925135230560_hu673712a87fab98b249a9be437b1c8c09_46858_977x0_resize_q82_h2_lanczos_3.webp#centered 977w" sizes="(min-width: 768px) 720px, 100vw"
    width="977" height="671"
    alt="image-20220925135230560"
     class="responsive-image"
    loading="lazy" decoding="async"></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 src="/dailyai/stable-diffusion-videos-with-visions-of-chaos-deforum-animation/img/image-20220925135852738_hu65e9881087bc11f4bad86d55849d451f_35416_720x0_resize_q82_h2_lanczos_3.webp#centered"
    width="720" height="485"
    alt="image-20220925135852738"
     class="responsive-image"
    loading="lazy" decoding="async"></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>
    
    <item>
      <title>Fine Tuning Stable Diffusion Images with Cross Attention Control</title>
      <media>https://reticulated.net/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/hero.png</media>
      <link>https://reticulated.net/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/</link>
      <pubDate>Sat, 17 Sep 2022 12:19:38 -0500</pubDate>
      
      <guid>https://reticulated.net/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/</guid>
      <description>Newly released tools give you much more control when refining prompts and images.</description>
      <content:encoded><![CDATA[<h1 id="image-refinement-with-cross-attention-control">Image Refinement with Cross Attention Control</h1>
<p>If you’ve been keeping up with the latest Stable Diffusion forks, you may have seen prompt editing get merged to the master branch of the <a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui">Automatic111 repo</a> a few days ago. There’s not a lot of information on how to use this other than <a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/dc769e097c878927fcd222cd855eb794726e922b#diff-8f98ca385d64a4ebe8c8a598d30717c0c7d4fa35d655f597221161047531b0f2R18">a comment in the commit</a>.</p>
<p>I believe the repo this originated from is <a href="https://github.com/bloc97/CrossAttentionControl">Cross Attention Control</a>. The README here describes more uses than the AUTOMATIC111 commit comment talks about. I wanted to do some testing on prompt editing anyway and thought I’d see what else out of the Cross Attention Control repo (if anything) worked and how well it performed.</p>
<p>This was one of the most impressive features I’ve tested so far – Here’s a quick peek swapping out prompts. All images are using the same seed:</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917131354952_huf0a1e0273136e2e16edaf4cac71eb476_470186_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917131354952"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917131521661_hu18e461caa14df3c5570392b38a746773_425378_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917131521661"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917131507571_hu8f04fc0ab8e589040ed144c530d32310_549245_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917131507571"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>A whale surfacing</code></td>
<td style="text-align:center"><code>a [whale:starfish:0.1] surfacing</code></td>
<td style="text-align:center"><code>a starfish surfacing</code></td>
</tr>
</tbody>
</table>
<p>A big limitation of the AI image generators is lack of fine tuning controls. I often get some image that’s close to what I had in my mind, but rather than furiously fighting with prompts for hours, <a href="https://pub.towardsai.net/i-spent-15-in-dall-e-2-credits-creating-this-ai-image-and-heres-what-i-learned-52f352912025">like the poor author of this post</a>, I’ve been waiting to be able to take an image that’s almost what I want and modify within the model it to be closer to my vision.</p>
<p>I think this delivers on that pretty well and has been a lot more impressive than my testing with textual inversion, which has been fairly lackluster but promises similar workflow improvements (by re/teaching the model a concept)</p>
<p>I suspect this is mostly due to poor embeddings  – I need to do some more testing on that soon, but I’m starting to think textual embeddings are going to be useful only for representing objects that are too rare or unique to be in the AI model. For most known things/styles, this seems like a more effective approach to fine tuning.</p>
<p>And kudos to the maintainers of the AUTOMATIC111 repo – Even while writing this there have been 10+ new features added including outpainting which I’ve been eagerly waiting for!</p>
<h2 id="cross-attention-control-functions">Cross Attention Control Functions</h2>
<p>The <a href="https://github.com/bloc97/CrossAttentionControl">Github repo</a> describes and gives examples of the following uses:</p>
<ul>
<li>
<p><strong>Target replacement</strong> to swap out an object in an image</p>
</li>
<li>
<p><strong>Style injection</strong> to keep the same base image but modify the tone/artist/etc</p>
</li>
<li>
<p><strong>Global editing</strong> which is not entirely clear to me and I think is just globally applied concepts that aren’t styles, like weather effects or seasons</p>
</li>
<li>
<p><strong>Direct token attention control</strong> to boost or deboost tokens/terms in a prompt</p>
</li>
<li>
<p>There also looks to be a way to <strong>merge images of 2 different prompts</strong> together <a href="https://github.com/bloc97/CrossAttentionControl#reducing-unpredictability-when-modifying-prompts">described here</a>.</p>
<p>I was not able to find a way to do this in the AUTOMATIC111 repo. There is a way to merge images of <em>the same</em> prompt, which we will look at below, but I don’t believe this is part of the Cross Attention Control merge.</p>
</li>
</ul>
<p>From my limited understanding, all of these essentially work generally in the same way. As the image is generated, the prompt is switched out, on the fly, based on your inputs. This could replace a subject or adjective in an image or add additional words to a prompt midway through generation.</p>
<p>Now let’s run some tests.</p>
<p><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917130609099_hued9c2235f495b466008304670406324e_363753_678x0_resize_q82_h2_lanczos_3.webp#centered"
    width="678" height="452"
    alt="test subjects…"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<p>All test variations will be run from from the same seed and other generation settings. I’ll give some extra information on how I ran the tests in case you want to run your own.
<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></p>
<h2 id="bomber-object-replacement-test">Bomber Object Replacement Test</h2>
<p>To start, let’s make a vintage bomber aerial photograph. We can just run some batches of images with random seeds until we get something we like.</p>
<p>After a few generations, we get this:</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917103953259_hucdda14fbbba6e29e1da0a015ddf5a4f3_383071_512x0_resize_q82_h2_lanczos_3.webp#centered"
    width="512" height="512"
    alt="image-20220917103953259"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>bomber in flight, wide shot</code></td>
</tr>
</tbody>
</table>
<p>Now, what if we want the same image but the bomber should be pink? If we just run the same settings and seed and change the prompt, the results are not consistent with our original image:</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917105050148_hu133be40e719abcf0bafd0e0102e87c04_269354_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917105050148"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>pink bomber in flight, wide shot</code></td>
</tr>
</tbody>
</table>
<p>Using Cross Attention Control, we can tell the generation to start with the original prompt we used and switch it at some % through the generation. Here, we’re using 100 steps, so the following prompt will switch to ‘pink bomber in flight’ at 50 steps (50%):</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917105430767_hu28809e7538ea35c96e595d8f9d9e6f29_373186_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917105430767"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>[bomber:pink bomber:0.5] in flight, wide shot</code></td>
</tr>
</tbody>
</table>
<p>Not exactly what we were looking for, but much closer to our original image and intention. What if we don’t even want a bomber at all. Let’s replace the entire bomber with Paul Rudd:</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917105736660_huc2cbd6743708e851fb2a691ec12568d7_350796_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917105736660"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>[bomber:paul rudd:0.3] in flight, wide shot</code></td>
</tr>
</tbody>
</table>
<p>Awesome. Here are some other style or object replacement tests based on this image. Note, you can add words in addition to replace words, which you’ll see in the prompts below:</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917105904624_hu2cac97e8cacbcf79b2f8b836b945c5cf_359373_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917105904624"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917105923084_hu7c2e63c71ba61b1c9954d0fe29d0754c_377321_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917105923084"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917105932048_hud9c5ba6efc54ff9287be33c7bf2a845e_368779_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917105932048"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917105949771_huc9c31f0f82e0100c49ded77b97388189_415322_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917105949771"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>[bomber:f16:0.28] in flight, wide shot</code></td>
<td style="text-align:center"><code>[vaporwave:.15] bomber in flight, wide shot</code></td>
<td style="text-align:center"><code>[steampunk:.25] bomber in flight, wide shot</code></td>
<td style="text-align:center"><code>[octane render:.15] bomber in flight, wide shot</code></td>
</tr>
</tbody>
</table>
<h2 id="colorful-moon---token-attention-control-color-test">Colorful Moon - Token Attention Control Color Test</h2>
<p>I did not see Token Attention Control called out in the commit comment explaining how to use this new merge, but it does work. This seems like it may even be a part of some other fork that was merged previously.</p>
<p>In any case, we can take an image and fine tune it by adding + or - to different tokens. Multiple +s and -s can be used for greater effect. This test is pretty simple, but we’ll use this again in the next test with more interesting results.</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917111615657_hu6b6ca871c6b73e7299e7861b1e61a879_417552_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917111615657"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>a red and blue moon</code></td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917111641526_hu1b6649be1e4be521f4c71afa2c6458bf_410882_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917111641526"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917111718339_huf05a175960ac02d6886eef0da5776bb7_412277_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917111718339"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>a -red and blue moon</code></td>
<td style="text-align:center"><code>a red and +blue moon</code></td>
</tr>
</tbody>
</table>
<p>Token control looks pretty hit or miss depending on the token and image. It seems to generally work, but when we ask for more red and less blue below, we get the bluest image of the whole set.</p>
<p>Since we know SD knows what ‘red’ and ‘blue’ are, I assume it does not really understand where the colors are in the image. This isn’t analyzing the image like a Photoshop image filter would by looking at the pixels and I realize don’t really understand what it’s doing or how to explain it failing like this.</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917124455968_huac7129aa0be83aae0e0739fe8f97783e_429589_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917124455968"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>a +red and -blue moon</code></td>
</tr>
</tbody>
</table>
<h2 id="fruit-on-the-beach---putting-it-all-together">Fruit on the Beach - Putting it all together</h2>
<p>Let’s see what we can make with one of my favorite AI Image prompts <code>a giant glittery cantaloupe on the beach at sunset</code>.</p>
<p>Before SD released, most free AI image services couldn’t deliver very well on this prompt, so I kept using it. Let’s use what we learned so far to try to tweak the scene to our liking, swap out the cantaloupe for other fruits, and have some famous artists complete the image.</p>
<p>Here’s our starting image:</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917112209863_hu3438f55b4799fc9025492103bbb9bba1_394583_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917112209863"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>giant glittery cantaloupe on the beach at sunset</code></td>
</tr>
</tbody>
</table>
<p>SD does a good job on the initial prompt but that’s not glittery enough for what I’m thinking.</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917112441115_huafa3f6fec2aef9c9673100c6b046b34f_400015_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917112441115"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>giant ++++glittery cantaloupe on the beach at sunset</code></td>
</tr>
</tbody>
</table>
<p>We can do a couple of tests to subjectively boost/decrease the other tokens to tweak even more.</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917112636911_hudf4324670ea8cbe5f5acb7c862273244_435645_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917112636911"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917112659372_hub7b9525de2a877ab074b267c02643b1a_415104_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917112659372"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>giant +++glittery ++++cantaloupe on the beach at ---sunset</code></td>
<td style="text-align:center"><code>---giant +glittery ++cantaloupe on the +beach at ---sunset</code></td>
</tr>
</tbody>
</table>
<p>Awesome. Cantaloupes aren’t very popular or recognizable – Let’s try taking the image above, on the right, and using some more common fruits. Note how using different values for when the prompt will change affects the output.</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917113027331_hu2c6b09ba0ff33560d018e1f0cc15f8a7_413890_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917113027331"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917113036863_hu30ef42e29c066e43c1de97cf179fd63a_407627_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917113036863"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>---giant +glittery [++cantaloupe:++apple:.5] on the +beach at ---sunset</code></td>
<td style="text-align:center"><code>---giant +glittery [++cantaloupe:++apple:.2] on the +beach at ---sunset</code></td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917113119929_hue6cb87c913e798f570f54ac2480266e8_434777_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917113119929"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917113130579_hu6ed8092e443f0221ec98d36355ba058a_429938_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917113130579"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>---giant +glittery [++cantaloupe:++banana:.02] on the +beach at ---sunset</code></td>
<td style="text-align:center"><code>---giant +glittery [++cantaloupe:++banana:.01] on the +beach at ---sunset</code></td>
</tr>
</tbody>
</table>
<p>For comparison, here are the apple and banana images without prompt switching and using the same seed/settings. They are similar and true to the prompt, but lose a lot from our original image.</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917113243790_hu1fc34ae8a5e6def11be295c7b79866d6_376762_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917113243790"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917113345748_huaf91db2066c232ae2b10aca30b56cca0_413620_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917113345748"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>---giant +glittery ++apple on the +beach at ---sunset</code></td>
<td style="text-align:center"><code>---giant +glittery ++banana on the +beach at ---sunset</code></td>
</tr>
</tbody>
</table>
<h3 id="dali-take-the-wheel">Dali Take the Wheel</h3>
<p>We have the pretty good looking glittery apple picture based on our cantaloupe picture above – Now let’s see what Stable Diffusion thinks Salvador Dali would do if we gave him that picture midway through generation.</p>
<p>Note, if we don’t match the prompt switches, he’ll draw us both fruits!</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917114526776_hu832778683cf6ce3e1b3ec796809ebaa4_446619_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917114526776"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917114550389_hu6a59ad68826310fb257c2f60e3f9f426_490982_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917114550389"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>[salvador dali painting of:.2] ---giant +glittery [++cantaloupe:++apple:.2] on the +beach at ---sunset</code></td>
<td style="text-align:center"><code>[salvador dali painting of:.05] ---giant +glittery [++cantaloupe:++apple:.2] on the +beach at ---sunset</code></td>
</tr>
</tbody>
</table>
<p>Those are slightly interesting, but let’s just give him it from the beginning.</p>
<p>Note, while doing these tests, I randomly tried <code>[term:.00]</code> which should technically be the same as <code>term</code> as it would get added to the prompt at step 0. This does create different images, as you can see below.</p>
<p>Perhaps terms in quotes can’t be added to the first step and this is the same as <code>[term: .01]</code> at 100 steps, but I have not confirmed that.</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917114416462_hu172735e1444c6081836aa91888677520_433732_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917114416462"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917114434739_huf378a6872410967cbe1296b188ff1d23_449822_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917114434739"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>salvador dali painting of ---giant +glittery [++cantaloupe:++apple:.2] on the +beach at ---sunset</code></td>
<td style="text-align:center"><code>[salvador dali painting of:.00] ---giant +glittery [++cantaloupe:++apple:.2] on the +beach at ---sunset</code></td>
</tr>
</tbody>
</table>
<p>OK, that looks like a great stopping point. Let’s do some outpainting in DALL-E and use this for the hero image for this post!</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917115405179_hu9cceb0328cc6476284523beda60c6756_1100725_1024x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917115405179_hu9cceb0328cc6476284523beda60c6756_1100725_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917115405179_hu9cceb0328cc6476284523beda60c6756_1100725_1024x0_resize_q82_h2_lanczos_3.webp 1024w" sizes="(min-width: 768px) 720px, 100vw"
    width="1024" height="1024"
    alt="image-20220917115405179"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<h2 id="merging-seeds-tests">Merging Seeds Tests</h2>
<p>As I said, while I couldn’t find the tool to merge images of different prompts <a href="https://github.com/bloc97/CrossAttentionControl#reducing-unpredictability-when-modifying-prompts">described here</a>, I did find (I assume from a different merged fork) a way to combine different seeds from the <em>same</em> prompt.</p>
<p>For the Automatic111 repo, this is found by clicking the Extra button next to the seed input in <code>txt2img</code></p>
<p><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917115455932_hu6c51b1aa64eed3d93e7fdf689ccfd838_28270_1049x0_resize_q82_h2_lanczos_3.webp#centered" srcset="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917115455932_hu6c51b1aa64eed3d93e7fdf689ccfd838_28270_720x0_resize_q82_h2_lanczos_3.webp#centered 720w, /dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917115455932_hu6c51b1aa64eed3d93e7fdf689ccfd838_28270_1049x0_resize_q82_h2_lanczos_3.webp#centered 1049w" sizes="(min-width: 768px) 720px, 100vw"
    width="1049" height="416"
    alt="image-20220917115455932"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<p>To run a test like below, enter a prompt and set a batch size your GPU can handle. Run generations until you find a good base image and modifier image you like. Enter the seeds in the UI and you’re ready to go.</p>
<p>Note, the info output for batch generations appears to be broken and only shows the initial seed, meaning you’ll need to add the image’s position - 1 to the seed to get the correct value. The seed for the image below is 4101654952 = 4101654947 + 5.</p>
<p><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917120147756_hud60c5cb75be4116a4cea793d5b77576d_589484_822x0_resize_q82_h2_lanczos_3.webp#centered" srcset="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917120147756_hud60c5cb75be4116a4cea793d5b77576d_589484_720x0_resize_q82_h2_lanczos_3.webp#centered 720w, /dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917120147756_hud60c5cb75be4116a4cea793d5b77576d_589484_822x0_resize_q82_h2_lanczos_3.webp#centered 822w" sizes="(min-width: 768px) 720px, 100vw"
    width="822" height="895"
    alt="image-20220917120147756"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<h3 id="alien-landscapes">Alien Landscapes</h3>
<p>Running the prompt <code>an alien landscape with giant blue and orange tropical trees</code> with random seeds, we eventually get these 2 images. Let’s try to merge them to get the look and style of right image with the layout of the left image.</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917120545858_hu745f4495ada11f7cf97dfcf558cd2c81_497379_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917120545858"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917120556804_hudf801c0b4d51bb6693de6625de1da65b_427977_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917120556804"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<p>After some failures and settings tweaking, this eventually seemed to work to some degree, though I don’t really see the ‘style’ of trees in the right image in the ‘successful’ generation.</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917120900340_hu3c64c97d9dedbb9c99592178bf07d493_453878_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917120900340"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917120912545_hu266fcdc4cafcb4bd210a501815211296_471263_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917120912545"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917120935342_huda00394663a0177dd05048e843d1da9f_524307_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917120935342"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917120849650_hu52f188629f79d1678f4a308e7e8f8b56_425821_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917120849650"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<h3 id="bangkok">Bangkok</h3>
<p>Let’s try a similar test with some AI generated photos. These 2 photos of Bangkok were generated with the same prompt. Can we ‘merge’ them to get a photo that looks like the left image but has the gold structure in the right image?</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917121251996_hudfbdcc728ae999ac76549d56b788039e_525145_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917121251996"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917121239881_huc189cd1fa4c749692481ee4b5b4c888f_478443_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917121239881"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917121228823_hu8da336c6b7c7625de04de734448b9384_513855_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917121228823"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<p>Not bad. We changed perspective some but I definitely think both images subjects and ‘feel’ are represented in both images.</p>
<p>I tried playing with the scale sliders for the variation to try to shrink the gold structure, hoping it would be somewhere else in the background. This kind of worked. It looks like it shrunk the structure, but not as I intended. It wants to put it on top of a skyscraper regardless of settings.</p>
<table>
<thead>
<tr>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917121514392_hu9283f15043098ff22831c18ee1f5d61b_523414_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917121514392"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th style="text-align:center"><img src="/dailyai/fine-tuning-stable-diffusion-images-with-cross-attention-control/img/image-20220917121530410_hu6f371b3e91a7784d9057729f1b00ee80_515112_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220917121530410"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<h2 id="final-thoughts">Final Thoughts</h2>
<p>For a few quick tests, I think these results are <em>very</em> impressive. I’m sure with a bit more time, effort, and refinement you could get extremely close to the image or modifications you’re looking for. Share your tips below in the comments.</p>
<p>Next time we will hopefully look at textual embeddings and outpainting in Stable Diffusion, which released yesterday.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>The Easiest Way to Use Stable Diffusion Right Now</title>
      <media>https://reticulated.net/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/hero.png</media>
      <link>https://reticulated.net/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/</link>
      <pubDate>Mon, 12 Sep 2022 07:50:31 -0500</pubDate>
      
      <guid>https://reticulated.net/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/</guid>
      <description>Simple install, blazing fast generation, extra tools and an incredible UI using Automatic&amp;#39;s Stable Diffusion UI Repository</description>
      <content:encoded><![CDATA[<h1 id="easy-stable-diffusion--textual-inversion">Easy Stable Diffusion + Textual Inversion!</h1>
<p>Wow – The pace at which the AI Image generation space has changed is something I have seldom seen in my life as a nerd. It reminds me of early Bitcoin tools or the Apple app store when it seemed like every day there was some new amazing app/tool/offering.</p>
<p>I think SD is even more engaging for the community than these since it’s both open source and produces something tangible and fun (looking at blockchain ledgers takes some imagination to see why it’s ‘cool’)</p>
<p>I personally had so much fun hacking on the original CompVis repo and building my own workflows. Even after a good amount of work though, the way I had been using Stable Diffusion wasn’t really sufficient for anything other than playing around or running tests on prompt syntax.</p>
<p>If I wanted to use SD as an <em>artist</em> and bring images to life based on my creative vision, I was missing a UI, simple integration between txt2img/img2img/face restoration/upscaling/etc, and so much more I didn’t even realize. Thankfully, a group of people much smarter than me have already got together and built all this out.</p>
<p><a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui">You can find the Automatic1111/stable-diffusion-webui repository here</a></p>
<p>This tool really lets you peek into the power of what these kinds of tools will do for artists in the very near future. The repository is updated frequently with new features or tools too – below we’ll look at setting up textual inversion.</p>
<p><img src="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912085432015_hu3c3ec348e66de586358414f4eb12f5ee_175049_1440x0_resize_q82_h2_lanczos_3.webp#centered" srcset="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912085432015_hu3c3ec348e66de586358414f4eb12f5ee_175049_720x0_resize_q82_h2_lanczos_3.webp#centered 720w, /dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912085432015_hu3c3ec348e66de586358414f4eb12f5ee_175049_1080x0_resize_q82_h2_lanczos_3.webp#centered 1080w, /dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912085432015_hu3c3ec348e66de586358414f4eb12f5ee_175049_1440x0_resize_q82_h2_lanczos_3.webp#centered 1440w" sizes="(min-width: 768px) 720px, 100vw"
    width="1440" height="829"
    alt="image-20220912085432015"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<h2 id="install">Install</h2>
<p>Installation is so simple and covered so well in the repository, I won’t add anything here. After installing the right version of Python, simply clicking the .bat file will install everything you need except the SD ckpt model. The model download links are also located in the repo.</p>
<h2 id="extras">Extras</h2>
<p>I’d recommend installing GPFGAN and ESRGAN as <a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui#installing-and-running">described here</a>. This will let you fix faces and easily upscale images. CodeFormer is also included but will be downloaded when you attempt to use it.</p>
<h2 id="making-it-public">Making it Public</h2>
<p>If you’re reading this, the likelihood you’ve been playing with AI image generators and SD for the past weeks/months is high. If you’ve been running SD on your machine, you almost certainly have wanted to show your friends too – Kudos to you if you exposed your machine publicly and walked people through entering terminal commands (I guess :P) – Now, thankfully, we have an easier way.</p>
<p>If you want to launch stable-diffusion-webui via a public URL in addition to your localhost url, you can make a simple edit to <code>webui.bat</code>:</p>
<p>Find the line that starts with <code>launch:</code> and change it to the following:</p>
<pre tabindex="0"><code>:launch
echo Launching webui.py...
%PYTHON% webui.py --share %COMMANDLINE_ARGS%
pause
exit /b
</code></pre><p>Now, when you launch <code>webui-user.bat</code>, a public URL will appear in the terminal you can share with others</p>
<p><img src="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912081350182_hud6187bf483680a89f74cb686d05cd465_41482_1151x0_resize_q82_h2_lanczos_3.webp#center" srcset="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912081350182_hud6187bf483680a89f74cb686d05cd465_41482_720x0_resize_q82_h2_lanczos_3.webp#center 720w, /dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912081350182_hud6187bf483680a89f74cb686d05cd465_41482_1080x0_resize_q82_h2_lanczos_3.webp#center 1080w, /dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912081350182_hud6187bf483680a89f74cb686d05cd465_41482_1151x0_resize_q82_h2_lanczos_3.webp#center 1151w" sizes="(min-width: 768px) 720px, 100vw"
    width="1151" height="257"
    alt="image-20220912081350182"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<h2 id="textual-inversion">Textual Inversion</h2>
<p>Textual Inversion is a very new concept in AI Image Generation/Stable Diffusion and allows you to create concepts and pass them to the model via embeddings. This means you can create databases of images that represent different styles or concepts and use them in your image generation prompts.</p>
<p>The Automatic1111 repo lets us do this today! Let’s set it up.</p>
<p><a href="https://github.com/rinongal/textual_inversion">You can read more about textual inversion here</a></p>
<p><img src="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912081841688_hu729116157c5e14fa1a93a1b31ba8430c_342165_1423x0_resize_q82_h2_lanczos_3.webp#centered" srcset="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912081841688_hu729116157c5e14fa1a93a1b31ba8430c_342165_720x0_resize_q82_h2_lanczos_3.webp#centered 720w, /dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912081841688_hu729116157c5e14fa1a93a1b31ba8430c_342165_1080x0_resize_q82_h2_lanczos_3.webp#centered 1080w, /dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912081841688_hu729116157c5e14fa1a93a1b31ba8430c_342165_1423x0_resize_q82_h2_lanczos_3.webp#centered 1423w" sizes="(min-width: 768px) 720px, 100vw"
    width="1423" height="615"
    alt="image-20220912081841688"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<h3 id="setup">Setup</h3>
<p>Per the repository, we need to create an <code>embeddings</code> folder in the repositories root folder.</p>
<p>Once we do this, we need to get some embeddings. This will almost certainly change as I write these words, but currently, there is a repository of user submitted embeddings available through <a href="https://huggingface.co/sd-concepts-library?sort_models=modified#models">HuggingFace/sd-concepts-library</a>.</p>
<p>Find some embeddings you like here. Download the <code>learned_embeddings.bin</code> file in the repository:</p>
<p><img src="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912082340626_hu3740e713f771154aa491c43ff3268f95_11363_620x0_resize_q82_h2_lanczos_3.webp#centered"
    width="620" height="323"
    alt="image-20220912082340626"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<p>From my brief research, a lot of these look to be comprised of only a few images. If you look for larger <code>bin</code> files, you can semi-easily see how large an embedding’s dataset is. I found larger datasets produced better results in the few tests I ran.</p>
<p>Rename the <code>learned_embeds.bin</code> file to <code>name.pt</code> where name is the term you want to use in your prompts to refer to the embedding.</p>
<p>You must not have folders or files other than the .pt embedding files in the embeddings folder or you will see errors in terminal.</p>
<p>If everything worked correctly, when you run a <code>txt2img</code> prompt with the embedded term, you will see “used custom term” in your detail output.</p>
<p><img src="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912082740653_hu5eadfc1d0713a19af2cb6740d62176de_19064_839x0_resize_q82_h2_lanczos_3.webp#centered" srcset="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912082740653_hu5eadfc1d0713a19af2cb6740d62176de_19064_720x0_resize_q82_h2_lanczos_3.webp#centered 720w, /dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912082740653_hu5eadfc1d0713a19af2cb6740d62176de_19064_839x0_resize_q82_h2_lanczos_3.webp#centered 839w" sizes="(min-width: 768px) 720px, 100vw"
    width="839" height="403"
    alt="image-20220912082740653"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<h1 id="final-thoughts">Final Thoughts</h1>
<p>Very excited to see what new features come out in the near future. I have been playing with the tiling settings I didn’t have access to in the CompVis repository with some really cool results, which I’ll share later this week. Here’s a sneak peek of some of the final results:</p>
<table>
<thead>
<tr>
<th><img src="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912083128254_huaba02ef14ffab3d9d83888835e5459f8_480759_1360x0_resize_q82_h2_lanczos_3.webp#centered" srcset="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912083128254_huaba02ef14ffab3d9d83888835e5459f8_480759_720x0_resize_q82_h2_lanczos_3.webp#centered 720w, /dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912083128254_huaba02ef14ffab3d9d83888835e5459f8_480759_1080x0_resize_q82_h2_lanczos_3.webp#centered 1080w, /dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912083128254_huaba02ef14ffab3d9d83888835e5459f8_480759_1360x0_resize_q82_h2_lanczos_3.webp#centered 1360w" sizes="(min-width: 768px) 720px, 100vw"
    width="1360" height="574"
    alt="image-20220912083128254"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th><img src="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912085314839_hu0cfb5725806100e5d613040691f95f82_373135_1310x0_resize_q82_h2_lanczos_3.webp#centered" srcset="/dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912085314839_hu0cfb5725806100e5d613040691f95f82_373135_720x0_resize_q82_h2_lanczos_3.webp#centered 720w, /dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912085314839_hu0cfb5725806100e5d613040691f95f82_373135_1080x0_resize_q82_h2_lanczos_3.webp#centered 1080w, /dailyai/the-easiest-way-to-use-stable-diffusion-right-now/img/image-20220912085314839_hu0cfb5725806100e5d613040691f95f82_373135_1310x0_resize_q82_h2_lanczos_3.webp#centered 1310w" sizes="(min-width: 768px) 720px, 100vw"
    width="1310" height="553"
    alt="image-20220912085314839"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<p>I’m also very keen to generate my own embeddings and do some more testing to better understand how that works and can be used.</p>
<p>That’s all for now – Enjoy!</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Stable Diffusion - Better Grids and Bulk Scripts</title>
      <media>https://reticulated.net/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/hero.png</media>
      <link>https://reticulated.net/dailyai/stable-diffusion-better-grids-and-bulk-scripts/</link>
      <pubDate>Sun, 28 Aug 2022 13:34:03 -0500</pubDate>
      
      <guid>https://reticulated.net/dailyai/stable-diffusion-better-grids-and-bulk-scripts/</guid>
      <description>A couple of easy to use ZSH scripts to bulk test Stable Diffusion Image Generation</description>
      <content:encoded><![CDATA[<p><a href="#Stable-Diffusion-Helper-Scripts">If you want to skip straight to scripts, click here!</a></p>
<h1 id="stable-diffusion-release">Stable Diffusion Release!</h1>
<blockquote>
<p>We knew the world would not be the same – A few people laughed, a few people cried, most people were silent.</p>
</blockquote>
<p>And just like that, the whole world changes. Stable Diffusion and its openness is a massive improvement to the tools we’ve been using in this space and our ability to modify/understand them.</p>
<p>It was bound to happen, but I am very impressed with  both how quickly it rolled out and how powerful the tool is.</p>
<table>
<thead>
<tr>
<th><img src="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828162850975_hu4b430f2746f04d979d2e14ed15baf2fe_147212_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220828162850975"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th><img src="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828163019395_huff82b14b47efd2c57c97a1de0fe340ae_98903_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220828163019395"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<p>I still have not explored most of the models or played around too much with the new tools added since latent diffusion, but one thing that was hindering me from doing testing at a good pace in the Latent-Diffusion repo was some challenges with the scripting and how the images are output.</p>
<p>No one likes long terminal commands and digging through integer named files – I decided to do something.</p>
<table>
<thead>
<tr>
<th><img src="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171553191_hu0c448aaf49a0ebcdfa7c639a37d6541e_120231_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220828171553191"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th><img src="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171647056_hu28949a3ac062cc3fdc14888a1f6ba764_79749_512x0_resize_q82_h2_lanczos_3.webp"
    width="512" height="512"
    alt="image-20220828171647056"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<p>As often happens with these kinds of things, what started as a simple exercise to build a bash alias ended up in a 2 day journey battling shell syntax and figuring out how to automate image processing tasks.</p>
<h1 id="making-improvements">Making Improvements</h1>
<p>I’ve been messing with improving the scripts and tools in latent-diffusion for a couple of weeks. Most of  the things I was trying to solve for or had solved still existed in the Stable Diffusion release.</p>
<p>I was able to port some of the changes I made to latent-diffusion to stable diffusion and decided to put some more effort into making simple ZSH commands to run bulk tests for txt2img and img2img and will release them below. Improvements include:</p>
<ul>
<li>Sample file names include prompts</li>
<li>Easier to run with defaults or parameter changes (<code>btxt2img 4 42 100</code>)</li>
<li>Unique folder output based on ISO dates</li>
<li>Better grid creation with imagemagick
<ul>
<li>img2img grid includes original photo and prompt labels for each sample</li>
<li>txt2img grid includes prompt labels and 1 row per prompt</li>
</ul>
</li>
<li>Grid settings (fonts, colors, borders)</li>
</ul>
<h1 id="stable-diffusion-helper-scripts">Stable Diffusion Helper Scripts</h1>
<p><a href="https://github.com/pwillia7/Stable-Diffusion-Helper-Scripts">Stable Diffusion Helper Scripts</a> requires ZSH. I have not tested this in bash, but I suspect a bunch of things will break. If you want to port this to bash or anything else – go for it and please let me know – but, you should probably just download ZSH if you intend to use this.</p>
<p>All the files you need are located in the <a href="https://github.com/pwillia7/Stable-Diffusion-Helper-Scripts">Github repository</a>.</p>
<h2 id="instructions-and-examples">Instructions and Examples</h2>
<h3 id="img2img-grids-with-different-strengths">Img2img Grids with Different Strengths</h3>
<p><img src="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828170745758_hud21e3e19a3e46d6fd7f7751c9ceb4cc6_212464_1440x0_resize_q82_h2_lanczos_3.webp#center" srcset="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828170745758_hud21e3e19a3e46d6fd7f7751c9ceb4cc6_212464_720x0_resize_q82_h2_lanczos_3.webp#center 720w, /dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828170745758_hud21e3e19a3e46d6fd7f7751c9ceb4cc6_212464_1080x0_resize_q82_h2_lanczos_3.webp#center 1080w, /dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828170745758_hud21e3e19a3e46d6fd7f7751c9ceb4cc6_212464_1440x0_resize_q82_h2_lanczos_3.webp#center 1440w" sizes="(min-width: 768px) 720px, 100vw"
    width="1440" height="523"
    alt="image-20220828170745758"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<p><img src="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171026573_hud873ac30f0ed7587c3bd30467ca12240_210220_1440x0_resize_q82_h2_lanczos_3.webp#center" srcset="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171026573_hud873ac30f0ed7587c3bd30467ca12240_210220_720x0_resize_q82_h2_lanczos_3.webp#center 720w, /dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171026573_hud873ac30f0ed7587c3bd30467ca12240_210220_1080x0_resize_q82_h2_lanczos_3.webp#center 1080w, /dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171026573_hud873ac30f0ed7587c3bd30467ca12240_210220_1440x0_resize_q82_h2_lanczos_3.webp#center 1440w" sizes="(min-width: 768px) 720px, 100vw"
    width="1440" height="523"
    alt="image-20220828171026573"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<p><img src="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171415965_hu462b1004839bde1a4e1395dd3b5851cd_973891_1440x0_resize_q82_h2_lanczos_3.webp#center" srcset="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171415965_hu462b1004839bde1a4e1395dd3b5851cd_973891_720x0_resize_q82_h2_lanczos_3.webp#center 720w, /dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171415965_hu462b1004839bde1a4e1395dd3b5851cd_973891_1080x0_resize_q82_h2_lanczos_3.webp#center 1080w, /dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171415965_hu462b1004839bde1a4e1395dd3b5851cd_973891_1440x0_resize_q82_h2_lanczos_3.webp#center 1440w" sizes="(min-width: 768px) 720px, 100vw"
    width="1440" height="1138"
    alt="image-20220828171415965"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<h3 id="txt2img-grids">Txt2img Grids</h3>
<p><img src="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828170357128_hude7c0f9806ccc80903c2df3fb4d6cd85_293917_1027x0_resize_q82_h2_lanczos_3.webp#center" srcset="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828170357128_hude7c0f9806ccc80903c2df3fb4d6cd85_293917_720x0_resize_q82_h2_lanczos_3.webp#center 720w, /dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828170357128_hude7c0f9806ccc80903c2df3fb4d6cd85_293917_1027x0_resize_q82_h2_lanczos_3.webp#center 1027w" sizes="(min-width: 768px) 720px, 100vw"
    width="1027" height="972"
    alt="image-20220828170357128"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<h3 id="how-to-use">How to Use</h3>
<ul>
<li>Clone the repo or download the files</li>
<li>Copy <code>txt2img2.py</code> and <code>img2img2.py</code> to your <code>stable-diffusion/scripts</code> folder</li>
<li>Run <code>cat ./zshrc_scripts &gt;&gt; ~/.zshrc</code></li>
<li>Open <code>~/.zshrc</code> in a text editor and fill out the <code>User Entered Variables</code> section
<ul>
<li>The paths for Stable Diffusion and the font to use for grid labels need to be changed for your system</li>
<li>You will need to create the prompt txt files if they do not exist</li>
</ul>
</li>
<li>Restart your shell or run <code>source ~/.zshrc</code></li>
</ul>
<p>Now you can create a list of prompts in your img or txt prompt file (1 prompt per line like with the standard script).</p>
<p>When you’re ready to generate, run <code>btxt2img</code> or <code>bimg2img /path/to/img</code>.</p>
<p>The samples (and original file for <code>bimg2img</code>) will be saved to its own timestamped directory in the output folder. The new grid will be saved to the same directory as <code>fullgrid.png</code></p>
<p>For help changing parameters, check the <code>~/.zshrc</code> file or run either command with the <code>--help</code> argument.</p>
<h3 id="up-next">Up Next</h3>
<p>In Latent-Diffusion, I created a script to compare RAD with LDM models that I need to remake in Stable-Diffusion. I will probably wait to do this until I figure out how to make my own image databases for RAD. I did find <a href="https://replicate.com/afiaka87/retrieval-augmented-diffusion">a repository</a> that has an example of doing this, so hopefully I can use that to figure something out.</p>
<p>I also need to rework the grid tools to account for generations of more than 5 or 6 images to split the strips into multiple rows.</p>
<p>Enjoy – Please leave any questions or comments below!</p>
<p><img src="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171319680_hucc044388f0985eca1b6c412d3894e9c6_235333_800x0_resize_q82_h2_lanczos_3.webp#center" srcset="/dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171319680_hucc044388f0985eca1b6c412d3894e9c6_235333_720x0_resize_q82_h2_lanczos_3.webp#center 720w, /dailyai/stable-diffusion-better-grids-and-bulk-scripts/img/image-20220828171319680_hucc044388f0985eca1b6c412d3894e9c6_235333_800x0_resize_q82_h2_lanczos_3.webp#center 800w" sizes="(min-width: 768px) 720px, 100vw"
    width="800" height="566"
    alt="image-20220828171319680"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Running your own A.I. Image Generator with Latent-Diffusion</title>
      <media>https://reticulated.net/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/hero.png</media>
      <link>https://reticulated.net/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/</link>
      <pubDate>Sun, 07 Aug 2022 10:07:36 -0500</pubDate>
      
      <guid>https://reticulated.net/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/</guid>
      <description>Run your own text to image prompts with CUDA, a bunch of disk space, and an insane amount of memory.</description>
      <content:encoded><![CDATA[<h1 id="dall-e-homebrew">DALL-E Homebrew</h1>
<p>In this post, we’ll look at getting setup with running your own A.I. image generator. You need a Linux system with a CUDA enabled card to get this working through to the end. I did get the basic txt-2img script working in Windows. Unfortunately, for the July released <em>retrieval-augmented diffusion models</em>, you need <code>scann</code> in order to index the openimages dataset, which is only available on Linux. <a href="https://docs.microsoft.com/en-us/windows/wsl/install">WSL</a> worked fine for me.</p>
<table>
<thead>
<tr>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154420530_hu18896a84edb0a8dcdf0a025681b7410b_491523_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154420530_hu18896a84edb0a8dcdf0a025681b7410b_491523_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154420530_hu18896a84edb0a8dcdf0a025681b7410b_491523_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="dog lion - rdm model"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154436894_hu3e2581d67db0209b93b2d9327028ebe0_503104_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154436894_hu3e2581d67db0209b93b2d9327028ebe0_503104_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154436894_hu3e2581d67db0209b93b2d9327028ebe0_503104_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="dog lion - rdm model"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154515353_hu8632c9d22a8d58b89ef0924f33c6d7a6_459016_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154515353_hu8632c9d22a8d58b89ef0924f33c6d7a6_459016_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154515353_hu8632c9d22a8d58b89ef0924f33c6d7a6_459016_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="dog lion - rdm model"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154507821_hu1eb200dcbdd061b64c49dfdd4aad6507_468331_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154507821_hu1eb200dcbdd061b64c49dfdd4aad6507_468331_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154507821_hu1eb200dcbdd061b64c49dfdd4aad6507_468331_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="dog lion - rdm model"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<p>Here’s roughly what I gather you’ll need:</p>
<ul>
<li>Linux (WSL fine)</li>
<li>11.3 CUDA graphics</li>
<li>&gt;= 32GB RAM</li>
<li>50GB disk space (~30GB without openimages)</li>
<li>3xxx series card (I am just guessing here. This is all being done with a 3090 FE)</li>
</ul>
<h1 id="latent-diffusion">Latent-Diffusion</h1>
<p>I randomly stumbled upon the <a href="https://github.com/CompVis/latent-diffusion">latent-diffusion repo</a> while I was browsing AI subreddits. A few posts mentioned it and I didn’t know what it was so I went googling.</p>
<p>I am not a computer scientist, mathmatician, or any of the things that would be required to really understand what’s going on here. The paper about the new RAD models are understandable and interesting, but I haven’t done much research yet beyond that.</p>
<p><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154208076_hu8c43264af1cbc05fd20706cd6456fd12_39749_256x0_resize_q82_h2_lanczos_3.webp#center"
    width="256" height="256"
    alt="image-20220807154208076"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<h2 id="text-to-image-vs-rad">Text-to-image vs. RAD</h2>
<p>There are 2 image generation techniques possible with Latent Diffusion. We will install and take a look at both.</p>
<p>I believe the txt2-img model that we’ll setup first is what we are used to with other image generation tools online – it makes a super low res image clip thinks is a good prompt match and denoises and upscales it.</p>
<p>The RAD model uses a configurable database of images as a reference AND does the diffusion like we are used to. This seems to mean it’s less good as a general purpose generator, but could be used with a specific training set you could feasibly create. I will try this in the future.</p>
<p>RAD also generates 768X768 images which is pretty impressive.</p>
<table>
<thead>
<tr>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154240381_hue31c4bc68245da9d9d9fa5629b107bb0_243111_768x0_resize_q82_h2_lanczos_3.webp#centered" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154240381_hue31c4bc68245da9d9d9fa5629b107bb0_243111_720x0_resize_q82_h2_lanczos_3.webp#centered 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154240381_hue31c4bc68245da9d9d9fa5629b107bb0_243111_768x0_resize_q82_h2_lanczos_3.webp#centered 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="giant cantaloupe at the beach"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155507820_hu59020906d6e3ce4dee55dce67cde2128_321669_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155507820_hu59020906d6e3ce4dee55dce67cde2128_321669_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155507820_hu59020906d6e3ce4dee55dce67cde2128_321669_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="Giant cantaloupe at the beach"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<h1 id="install-instructions">Install Instructions</h1>
<h2 id="text-to-image">Text-to-Image</h2>
<ul>
<li>
<p>Make sure you have <a href="https://developer.nvidia.com/cuda-toolkit">CUDA 11.3</a> installed and <code>conda</code> works in your shell. You can get <a href="https://docs.conda.io/en/latest/">Conda here</a></p>
</li>
<li>
<p><a href="https://pytorch.org/get-started/locally/">(Re)install Pytorch now</a>, lest ye end up in dependency hell later. I did this via <code>pip</code> but conda may work too.</p>
</li>
<li>
<p><a href="https://github.com/CompVis/latent-diffusion">Clone the repo to a drive with a lot of free space</a></p>
</li>
<li>
<p><code>cd</code> into the repo and run:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">conda env create -f environment.yaml
</span></span><span class="line"><span class="cl">conda activate ldm
</span></span></code></pre></div><p>This will setup the initial environment. If you get errors with Pytorch later and need to reinstall it, come back to environment.yaml and reinstall using the correct package versions.</p>
</li>
<li>
<p>Download the model and you’re all ready to go so long as your torch dependencies are all setup correct.</p>
</li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mkdir -p models/ldm/text2img-large/
</span></span><span class="line"><span class="cl">wget -O models/ldm/text2img-large/model.ckpt https://ommer-lab.com/files/latent-diffusion/nitro/txt2img-f8-large/model.ckpt
</span></span></code></pre></div><p>You should be able to sample images now using:</p>
<pre tabindex="0"><code>python scripts/txt2img.py --prompt &#34;my cool image&#34;
</code></pre><p>Make sure to see the options you’re able to set in the README.</p>
<p>You can use this bash script to make running everything from a shell easier. You can include this in your <code>~/.bashrc</code> file and reopen your shell. Make sure to change the 3 paths to suit your needs. We’ll look at PLMS later.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">function</span> txt2img<span class="o">()</span> <span class="o">{</span>
</span></span><span class="line"><span class="cl">  <span class="k">if</span> <span class="o">[</span> <span class="nv">$#</span> -eq <span class="m">0</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">    <span class="nb">echo</span> <span class="s2">&#34;Usage: diffuse &#39;[prompt]&#39; [--plms]&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="nb">exit</span> <span class="m">1</span>
</span></span><span class="line"><span class="cl">  <span class="k">fi</span>
</span></span><span class="line"><span class="cl">  <span class="nb">cd</span> /mnt/c/diffusion/latent-diffusion<span class="p">;</span>
</span></span><span class="line"><span class="cl">  conda activate ldm<span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="k">if</span> <span class="o">[</span> <span class="nv">$2</span> <span class="o">=</span> <span class="s1">&#39;--plms&#39;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">    python scripts/txt2img.py --prompt <span class="nv">$1</span> --outdir <span class="s1">&#39;/mnt/g/My Drive/AI Image Tests/text2img&#39;</span> --plms --n_iter <span class="m">4</span> --ddim_eta 0.0
</span></span><span class="line"><span class="cl">  <span class="k">else</span>
</span></span><span class="line"><span class="cl">    python scripts/txt2img.py --prompt <span class="nv">$1</span> --outdir <span class="s1">&#39;/mnt/g/My Drive/AI Image Tests/text2img&#39;</span> --n_iter <span class="m">4</span> --ddim_eta 0.0
</span></span><span class="line"><span class="cl">  <span class="k">fi</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span></code></pre></div><p>The images are 512X512 by default. You can use <a href="https://colab.research.google.com/drive/1xqzUi2iXQXDqXBHQGP9Mqt2YrYW6cx-J?usp=sharing#scrollTo=aCoHC2jbq_Ka">This Jupiter Notebook</a> to upscale the images with pretty good results.</p>
<h3 id="troubleshooting">Troubleshooting</h3>
<ul>
<li>If you get CUDA memory errors running commands, try decreasing the batch size. Use <code>htop</code> to troubleshoot/view memory usage.</li>
<li>If using WSL, make sure all your RAM is available to linux.</li>
<li>If you get torch related errors, you probably need to reinstall Pytorch. This will likely cause other issues with packages. Check environment.yaml and manually install the correct package versions with <code>pip</code> and/or <code>conda</code> (I did both and am not sure which made everything work)</li>
</ul>
<table>
<thead>
<tr>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155754576_hu5406c48cc00206958f8e98a91face9d6_432378_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155754576_hu5406c48cc00206958f8e98a91face9d6_432378_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155754576_hu5406c48cc00206958f8e98a91face9d6_432378_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807155754576"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155807229_hu994cda302678006faf9696b340d68ac2_386453_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155807229_hu994cda302678006faf9696b340d68ac2_386453_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155807229_hu994cda302678006faf9696b340d68ac2_386453_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807155807229"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<h2 id="rdm">RDM</h2>
<p>You can read more about RDM <a href="https://arxiv.org/abs/2204.11824">here</a>. As said before, it essentially combines a database of images with Clip descriptions with the existing diffusion process, from what I understand. This part takes a lot longer to get running.</p>
<p>Note, this model, especially when using the openimages training is best at recreating real things and doesn’t seem very good (yet) and creating the weird images we’re used to from the diffusion models.</p>
<ul>
<li>
<p>Get the Text-to-Image model working first</p>
</li>
<li>
<p>Install new packages and download training model.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install <span class="nv">transformers</span><span class="o">==</span>4.19.2 scann <span class="nv">kornia</span><span class="o">==</span>0.6.4 <span class="nv">torchmetrics</span><span class="o">==</span>0.6.0
</span></span><span class="line"><span class="cl">pip install git+https://github.com/arogozhnikov/einops.git
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">mkdir -p models/rdm/rdm768x768/
</span></span><span class="line"><span class="cl">wget -O models/rdm/rdm768x768/model.ckpt https://ommer-lab.com/files/rdm/model.ckpt
</span></span></code></pre></div></li>
<li>
<p>Test everything is working so far with</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">python scripts/knn2img.py  --prompt <span class="s2">&#34;I&#39;m a computer&#34;</span>
</span></span></code></pre></div></li>
<li>
<p>If everything went well, you should see a success text in your shell. Now we need to download all the image indexes/models. The openimages zip is 11GB. The ArtBench data is pretty small.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mkdir -p data/rdm/retrieval_databases
</span></span><span class="line"><span class="cl">wget -O data/rdm/retrieval_databases/artbench.zip https://ommer-lab.com/files/rdm/artbench_databases.zip
</span></span><span class="line"><span class="cl">wget -O data/rdm/retrieval_databases/openimages.zip https://ommer-lab.com/files/rdm/openimages_database.zip
</span></span><span class="line"><span class="cl">unzip data/rdm/retrieval_databases/artbench.zip -d data/rdm/retrieval_databases/
</span></span><span class="line"><span class="cl">unzip data/rdm/retrieval_databases/openimages.zip -d data/rdm/retrieval_databases/
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">mkdir -p data/rdm/searchers
</span></span><span class="line"><span class="cl">wget -O data/rdm/searchers/artbench.zip https://ommer-lab.com/files/rdm/artbench_searchers.zip
</span></span><span class="line"><span class="cl">unzip data/rdm/searchers/artbench.zip -d data/rdm/searchers
</span></span></code></pre></div></li>
</ul>
<p>We’re ready to use the Artbench models now (which work pretty well in my limited testing), but what we really want is to use the massive openimages model as our reference. We downloaded the data, but we need to create the index.</p>
<p>If you want to test the Artbench database, run</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">python scripts/knn2img.py --prompt <span class="s2">&#34;A blue pig&#34;</span> --use_neighbors --knn <span class="m">20</span> 
</span></span></code></pre></div><table>
<thead>
<tr>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155912575_hu06f24d3409689ebeaa4b2f6fdfb5d895_296072_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155912575_hu06f24d3409689ebeaa4b2f6fdfb5d895_296072_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155912575_hu06f24d3409689ebeaa4b2f6fdfb5d895_296072_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807155912575"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155927854_hu4750db29b33f9527fe949446dea82fa3_235236_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155927854_hu4750db29b33f9527fe949446dea82fa3_235236_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155927854_hu4750db29b33f9527fe949446dea82fa3_235236_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807155927854"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<h3 id="openimages-index">Openimages Index</h3>
<p>Unless you have a super computer, the terrible memory management in python multiprocessing (from what I can tell) will stop us from using the 4 files we unzipped with the script from the repo to index them. Everything else I tried, the processes would run out of memory.</p>
<p>Luckily, we just need to concatenate the files. You can delete the old part files after if you would like. We also need to move the part files out of the openimages folder.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> data/rdm/retrieval_databases/openimages/
</span></span><span class="line"><span class="cl">cat 2000000x768_part1.npz 2000000x768_part2.npz 2000000x768_part3.npz 2000000x768_part4.npz &gt; 2000000x768.npz
</span></span><span class="line"><span class="cl">mv 2000000x768_* ~/temp
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> ../../../../
</span></span></code></pre></div><p>Now when we run the training script, we shouldn’t run out of memory. I think this is some issue in their multi file function in the training script.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">python scripts/train_searcher.py
</span></span></code></pre></div><ul>
<li>
<p>We need to change the batch size in <code>scripts/knn2img.py</code> so we don’t run out of GPU memory. You may need to lower to 1, but I was able to set to 2 on a 3090.</p>
</li>
<li>
<p>Open <code>scripts/knn2img.py</code> in an editor</p>
</li>
<li>
<p>Go to line 243 or find “n_samples”</p>
</li>
<li>
<p>Change the default value to 1 or 2 and save</p>
</li>
<li>
<p>You can also do this using the command line parameter, but since it will never work for me, I wanted to change the default value. Note if you update the repo in the future this will likely get overwritten.</p>
</li>
</ul>
<p>Now we can generate RDM images using the openimages database:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">python scripts/knn2img.py --prompt <span class="s2">&#34;A blue pig&#34;</span> --database openimages --use_neighbors --knn <span class="m">20</span> 
</span></span></code></pre></div><p>Here is a  <code>~/.bashrc</code> script to run it conveniently. Again, make sure to change the 3 paths to suit your needs:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="k">function</span> diffuse<span class="o">()</span> <span class="o">{</span>
</span></span><span class="line"><span class="cl">    <span class="k">if</span> <span class="o">[</span> <span class="nv">$#</span> -eq <span class="m">0</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">       <span class="nb">echo</span> <span class="s2">&#34;Usage: diffuse &#39;[prompt]&#39; [--plms]&#34;</span>
</span></span><span class="line"><span class="cl">       <span class="nb">exit</span> <span class="m">1</span>
</span></span><span class="line"><span class="cl">    <span class="k">fi</span>
</span></span><span class="line"><span class="cl">    <span class="nb">cd</span> /mnt/c/diffusion/latent-diffusion<span class="p">;</span>
</span></span><span class="line"><span class="cl">    conda activate ldm<span class="p">;</span>
</span></span><span class="line"><span class="cl">    <span class="k">if</span> <span class="o">[</span> <span class="nv">$2</span> <span class="o">=</span> <span class="s1">&#39;--plms&#39;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">        python scripts/knn2img.py  --database openimages --prompt <span class="nv">$1</span> --use_neighbors --outdir <span class="s1">&#39;/mnt/g/My Drive/AI Image Tests/RDM&#39;</span> --knn <span class="m">20</span> --plms
</span></span><span class="line"><span class="cl">    <span class="k">else</span>
</span></span><span class="line"><span class="cl">        python scripts/knn2img.py  --database openimages --prompt <span class="nv">$1</span> --use_neighbors --outdir <span class="s1">&#39;/mnt/g/My Drive/AI Image Tests/RDM&#39;</span> --knn <span class="m">20</span>
</span></span><span class="line"><span class="cl">    <span class="k">fi</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span></code></pre></div><h2 id="speeding-things-up">Speeding Things Up</h2>
<p>You can also run prompts in batches by creating a file (in this case <code>prompts.txt</code>) and pointing the script to it with the <code>–from-file</code> parameter like this</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">python scripts/knn2img.py  --database openimages --from-file ./prompts.txt --use_neighbors --outdir <span class="s1">&#39;/mnt/g/My Drive/AI Image Tests/RDM&#39;</span> --knn <span class="m">20</span>
</span></span></code></pre></div><p>sample <code>prompts.txt</code></p>
<pre tabindex="0"><code>prompt 1
prompt 2
prompt 3
</code></pre><p>This should save a lot of time if you’re running a lot of queries since the model only gets loaded once. The text-to-image model does not have this option.</p>
<table>
<thead>
<tr>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154938662_hudff809c5a600942030b8ada88eee7639_466691_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154938662_hudff809c5a600942030b8ada88eee7639_466691_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154938662_hudff809c5a600942030b8ada88eee7639_466691_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="sports car in the desert"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155008070_hu0e3b0269a299d87701ad412501750dd9_426021_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155008070_hu0e3b0269a299d87701ad412501750dd9_426021_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155008070_hu0e3b0269a299d87701ad412501750dd9_426021_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="sports car in the desert"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
<th><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155036735_huec3b73184401977d30648a1a15c295c3_252869_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155036735_huec3b73184401977d30648a1a15c295c3_252869_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155036735_huec3b73184401977d30648a1a15c295c3_252869_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="sports car in the desert"
     class="responsive-image"
    loading="lazy" decoding="async"></th>
</tr>
</thead>
</table>
<h1 id="initial-testing--plms">Initial Testing, &amp; PLMS</h1>
<p>Below are some inital results from both the models with PLMS on and off. PLMS should make things run faster. For now, we won’t measure the speed increase but will look subjectively at image quality/results.</p>
<p>Since the RDM model will only make 2 photos at a time for my system, I included both photos instead of a grid for that model.</p>
<p>I will almost certainly do more specific testing in the future and these models will be included in future comparison posts.</p>
<hr>
<p><em><em>A wood house on a hill, landscape photography</em></em></p>
<p><strong>Text-to-image</strong></p>
<table>
<thead>
<tr>
<th><em>without plms</em></th>
<th><em>with plms</em></th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807150052836_hu5c5ac5abd691b89383badfea60eb77cd_611935_1034x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807150052836_hu5c5ac5abd691b89383badfea60eb77cd_611935_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807150052836_hu5c5ac5abd691b89383badfea60eb77cd_611935_1034x0_resize_q82_h2_lanczos_3.webp 1034w" sizes="(min-width: 768px) 720px, 100vw"
    width="1034" height="1034"
    alt="image-20220807150052836"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807153545252_hu1d5f9df3ca542215553ff8cfd10fc32c_558037_1034x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807153545252_hu1d5f9df3ca542215553ff8cfd10fc32c_558037_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807153545252_hu1d5f9df3ca542215553ff8cfd10fc32c_558037_1034x0_resize_q82_h2_lanczos_3.webp 1034w" sizes="(min-width: 768px) 720px, 100vw"
    width="1034" height="1034"
    alt="image-20220807153545252"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
</tbody>
</table>
<p><strong>RDM</strong></p>
<table>
<thead>
<tr>
<th><em>without plms</em></th>
<th><em>with plms</em></th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807145854952_huff577c6a2201b81008e40bf6537293fa_371112_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807145854952_huff577c6a2201b81008e40bf6537293fa_371112_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807145854952_huff577c6a2201b81008e40bf6537293fa_371112_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807145854952"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807145920778_hudc49a84bcd101a4ab00ced1e429c33e2_304083_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807145920778_hudc49a84bcd101a4ab00ced1e429c33e2_304083_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807145920778_hudc49a84bcd101a4ab00ced1e429c33e2_304083_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807145920778"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807145911367_huea36fb6e1bbf52298168f17bc5dd9c0d_370557_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807145911367_huea36fb6e1bbf52298168f17bc5dd9c0d_370557_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807145911367_huea36fb6e1bbf52298168f17bc5dd9c0d_370557_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807145911367"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807145931866_hu8760b0447eac87f83b78b09c0767f4e2_332674_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807145931866_hu8760b0447eac87f83b78b09c0767f4e2_332674_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807145931866_hu8760b0447eac87f83b78b09c0767f4e2_332674_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807145931866"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
</tbody>
</table>
<p><em><em>A purple stop sign</em></em></p>
<hr>
<p><strong>Text-to-image</strong></p>
<table>
<thead>
<tr>
<th><em>without plms</em></th>
<th><em>with plms</em></th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154729984_hu5f8777ec70d83ba5ae0dae1f5b413f96_403602_1034x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154729984_hu5f8777ec70d83ba5ae0dae1f5b413f96_403602_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807154729984_hu5f8777ec70d83ba5ae0dae1f5b413f96_403602_1034x0_resize_q82_h2_lanczos_3.webp 1034w" sizes="(min-width: 768px) 720px, 100vw"
    width="1034" height="1034"
    alt="image-20220807154729984"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807153711466_hud6abbad880a9e1215f00f419f118e666_443791_1034x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807153711466_hud6abbad880a9e1215f00f419f118e666_443791_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807153711466_hud6abbad880a9e1215f00f419f118e666_443791_1034x0_resize_q82_h2_lanczos_3.webp 1034w" sizes="(min-width: 768px) 720px, 100vw"
    width="1034" height="1034"
    alt="image-20220807153711466"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
</tbody>
</table>
<p><strong>RDM</strong></p>
<table>
<thead>
<tr>
<th><em>without plms</em></th>
<th><em>with plms</em></th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807150500598_hu0dd017b01d8e32f5289dce826aa1b498_356847_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807150500598_hu0dd017b01d8e32f5289dce826aa1b498_356847_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807150500598_hu0dd017b01d8e32f5289dce826aa1b498_356847_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807150500598"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807153000850_hud5d45b4443f5c614da4522e5e9792c5b_327315_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807153000850_hud5d45b4443f5c614da4522e5e9792c5b_327315_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807153000850_hud5d45b4443f5c614da4522e5e9792c5b_327315_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807153000850"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807151421393_hub4979b455c50defb8314af9b5b5fdc8e_394639_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807151421393_hub4979b455c50defb8314af9b5b5fdc8e_394639_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807151421393_hub4979b455c50defb8314af9b5b5fdc8e_394639_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807151421393"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807153013778_hucff3e116e8a4553f5fdf4685b35d55f5_454124_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807153013778_hucff3e116e8a4553f5fdf4685b35d55f5_454124_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807153013778_hucff3e116e8a4553f5fdf4685b35d55f5_454124_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807153013778"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
</tbody>
</table>
<hr>
<p><em><em>fox den, digital art</em></em></p>
<p><strong>Text-to-image</strong></p>
<table>
<thead>
<tr>
<th><em>without plms</em></th>
<th><em>with plms</em></th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155228088_hu0fe1a415cea260f9572701ce50451bb0_473935_1034x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155228088_hu0fe1a415cea260f9572701ce50451bb0_473935_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155228088_hu0fe1a415cea260f9572701ce50451bb0_473935_1034x0_resize_q82_h2_lanczos_3.webp 1034w" sizes="(min-width: 768px) 720px, 100vw"
    width="1034" height="1034"
    alt="image-20220807155228088"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155634227_hud61d8d4efea09450db2b383bd168531a_468263_1034x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155634227_hud61d8d4efea09450db2b383bd168531a_468263_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807155634227_hud61d8d4efea09450db2b383bd168531a_468263_1034x0_resize_q82_h2_lanczos_3.webp 1034w" sizes="(min-width: 768px) 720px, 100vw"
    width="1034" height="1034"
    alt="image-20220807155634227"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
</tbody>
</table>
<p><strong>RDM</strong></p>
<table>
<thead>
<tr>
<th><em>without plms</em></th>
<th><em>with plms</em></th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807151441359_hudf8bf40a856b8f8b8b0713806a85601f_343927_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807151441359_hudf8bf40a856b8f8b8b0713806a85601f_343927_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807151441359_hudf8bf40a856b8f8b8b0713806a85601f_343927_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807151441359"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152859265_huc74c822065cf36d938719854e568131a_333740_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152859265_huc74c822065cf36d938719854e568131a_333740_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152859265_huc74c822065cf36d938719854e568131a_333740_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807152859265"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152235267_hu6043ab475ebf3f9fc4fca1a15d806832_364909_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152235267_hu6043ab475ebf3f9fc4fca1a15d806832_364909_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152235267_hu6043ab475ebf3f9fc4fca1a15d806832_364909_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807152235267"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152911615_huba4cc66968581046470c47dccc087e96_378627_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152911615_huba4cc66968581046470c47dccc087e96_378627_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152911615_huba4cc66968581046470c47dccc087e96_378627_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807152911615"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
</tbody>
</table>
<hr>
<p><em><em>winning the big game, award winning photography</em></em></p>
<p><strong>Text-to-image</strong></p>
<table>
<thead>
<tr>
<th><em>without plms</em></th>
<th><em>with plms</em></th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160007336_hubd05fca02abf847839a4525318558eb9_480912_1034x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160007336_hubd05fca02abf847839a4525318558eb9_480912_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160007336_hubd05fca02abf847839a4525318558eb9_480912_1034x0_resize_q82_h2_lanczos_3.webp 1034w" sizes="(min-width: 768px) 720px, 100vw"
    width="1034" height="1034"
    alt="image-20220807160007336"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160228471_hu807b92743315273afa885a28a11c3fa8_517634_1034x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160228471_hu807b92743315273afa885a28a11c3fa8_517634_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160228471_hu807b92743315273afa885a28a11c3fa8_517634_1034x0_resize_q82_h2_lanczos_3.webp 1034w" sizes="(min-width: 768px) 720px, 100vw"
    width="1034" height="1034"
    alt="image-20220807160228471"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
</tbody>
</table>
<p><strong>RDM</strong></p>
<table>
<thead>
<tr>
<th><em>without plms</em></th>
<th><em>with plms</em></th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807151456027_hu36b908051b9fa84726edb1c29efc9c93_374261_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807151456027_hu36b908051b9fa84726edb1c29efc9c93_374261_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807151456027_hu36b908051b9fa84726edb1c29efc9c93_374261_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807151456027"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152928304_hu5ced2b86fc5a9ca6ed8f87f992eb2c0d_370056_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152928304_hu5ced2b86fc5a9ca6ed8f87f992eb2c0d_370056_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152928304_hu5ced2b86fc5a9ca6ed8f87f992eb2c0d_370056_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807152928304"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152216729_hub6d53a7af6bba2c295fa6337a7274d8b_339142_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152216729_hub6d53a7af6bba2c295fa6337a7274d8b_339142_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152216729_hub6d53a7af6bba2c295fa6337a7274d8b_339142_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807152216729"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152940229_hub12b64c1ab34fe52a2e5f46003e0c144_335271_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152940229_hub12b64c1ab34fe52a2e5f46003e0c144_335271_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152940229_hub12b64c1ab34fe52a2e5f46003e0c144_335271_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807152940229"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
</tbody>
</table>
<hr>
<p><em><em>a sports car driving in sand dunes</em></em></p>
<p><strong>Text-to-image</strong></p>
<table>
<thead>
<tr>
<th><em>without plms</em></th>
<th><em>with plms</em></th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160557241_hud2ea61a0bea61c2a286a8d2e55fff9c2_372258_1034x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160557241_hud2ea61a0bea61c2a286a8d2e55fff9c2_372258_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160557241_hud2ea61a0bea61c2a286a8d2e55fff9c2_372258_1034x0_resize_q82_h2_lanczos_3.webp 1034w" sizes="(min-width: 768px) 720px, 100vw"
    width="1034" height="1034"
    alt="image-20220807160557241"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160838768_hu7e64c612ac0aaeedb06e18822e577386_362418_1034x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160838768_hu7e64c612ac0aaeedb06e18822e577386_362418_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160838768_hu7e64c612ac0aaeedb06e18822e577386_362418_1034x0_resize_q82_h2_lanczos_3.webp 1034w" sizes="(min-width: 768px) 720px, 100vw"
    width="1034" height="1034"
    alt="image-20220807160838768"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
</tbody>
</table>
<p><strong>RDM</strong></p>
<table>
<thead>
<tr>
<th><em>without plms</em></th>
<th><em>with plms</em></th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807151401781_huc9d75dfdb76e8242e9b87b2fb79b82c5_382229_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807151401781_huc9d75dfdb76e8242e9b87b2fb79b82c5_382229_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807151401781_huc9d75dfdb76e8242e9b87b2fb79b82c5_382229_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807151401781"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152825508_hua022f8bb58cf19e448e0e6b759850fb8_348519_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152825508_hua022f8bb58cf19e448e0e6b759850fb8_348519_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152825508_hua022f8bb58cf19e448e0e6b759850fb8_348519_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807152825508"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
<tr>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152200386_hu91c5090078c7f693cffbc55040b63a86_413348_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152200386_hu91c5090078c7f693cffbc55040b63a86_413348_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152200386_hu91c5090078c7f693cffbc55040b63a86_413348_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807152200386"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
<td><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152839511_hu7876a3ca61582ba850df1e6f38644557_513972_768x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152839511_hu7876a3ca61582ba850df1e6f38644557_513972_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807152839511_hu7876a3ca61582ba850df1e6f38644557_513972_768x0_resize_q82_h2_lanczos_3.webp 768w" sizes="(min-width: 768px) 720px, 100vw"
    width="768" height="768"
    alt="image-20220807152839511"
     class="responsive-image"
    loading="lazy" decoding="async"></td>
</tr>
</tbody>
</table>
<h1 id="an-image-generator-to-call-your-own">An Image Generator to Call Your Own</h1>
<p>And there you have it – no more credits or monthly limits, just pure AI image generation all your own. Once I figure out some tuning settings and create my own image training database, we’ll likely talk about this again.</p>
<p>Hopefully with some tuning and new releases/models this will get closer to the WOW factor DALL-E has.</p>
<p><img src="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160755376_hu4338466566b15554b839d70aff1777ee_154566_1320x0_resize_q82_h2_lanczos_3.webp" srcset="/dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160755376_hu4338466566b15554b839d70aff1777ee_154566_720x0_resize_q82_h2_lanczos_3.webp 720w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160755376_hu4338466566b15554b839d70aff1777ee_154566_1080x0_resize_q82_h2_lanczos_3.webp 1080w, /dailyai/running-your-own-ai-image-generator-with-latent-diffusion/img/image-20220807160755376_hu4338466566b15554b839d70aff1777ee_154566_1320x0_resize_q82_h2_lanczos_3.webp 1320w" sizes="(min-width: 768px) 720px, 100vw"
    width="1320" height="380"
    alt="image-20220807160755376"
     class="responsive-image"
    loading="lazy" decoding="async"></p>
<p>Please share any tips, questions and creations in the comments!</p>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
