<div itemprop="articleBody" data-v-0e838cd6="" style="font-weight: 400;"><p><strong>點贊 + 關注 + 收藏 = 學會了</strong></p>
<h1 data-id="heading-0">本文簡介</h1>
<p>Stable Diffusion 也可以制作動畫了挤巡,本期介紹“瞬息全宇宙”風格動畫的制作方法矾瘾。</p>
<p>先看看視頻赫悄。</p>
<p><span target="_blank"><span><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/d8e14f9701a846b389ec138eb2b6349a~tplv-k3u1fbpfcp-jj-mark:3024:0:0:0:q75.awebp#?w=1008&h=483&s=7674&e=png&b=000000" loading="lazy"></span></span></p>
<p>要生成這種風格的視頻寺酪,只需要在 Stable Diffusion 里寫幾句提示詞裸准,配置幾個參數(shù)梅尤,點擊一下生成按鈕就能做出來柜思。</p>
<p>制作這種視頻需要用到 Deforum 插件。不要被這名字嚇到巷燥,要做出這個視頻其實只需4步赡盘。</p>
<ol>
<li>下載 Deforum 插件</li>
<li>輸入提示詞</li>
<li>設置幀數(shù)</li>
<li>設置輸出參數(shù)</li>
</ol>
<h1 data-id="heading-1">動手操作</h1>
<p>我使用的是秋葉大佬的整合包,用 Windows 的工友們可以根據(jù)<a target="_blank" title="https://juejin.cn/post/7369534111075156019">《『SD』面向小白的AI繪畫工具:秋葉aaaki資源整合包》</a>文章安裝 SD缰揪。</p>
<p>啟動 SD WebUI 后陨享,來到 “擴展 - 可下載” 頁面搜索 “Deforum ”,然后點擊安裝即可钝腺。</p>
<p><img src="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/7ee22384d22e457d8e54124a4b6fc0ac~tplv-k3u1fbpfcp-jj-mark:3024:0:0:0:q75.awebp#?w=1920&h=912&s=464330&e=jpg&b=0e131f" alt="02.png" loading="lazy"></p>
<p>安裝完成后抛姑,重啟 SD WebUI,頁面中就會多出一個 Deforum艳狐。</p>
<p><img src="https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/15613d9b328d439cb47e25ad924398fa~tplv-k3u1fbpfcp-jj-mark:3024:0:0:0:q75.awebp#?w=1920&h=912&s=433173&e=jpg&b=131a29" alt="03.png" loading="lazy"></p>
<p>選中 Deforum定硝,然后選擇一個基礎模型(和文生圖選擇模型的方式一樣),然后點擊生成就會開始生成一個視頻毫目。</p>
<p><img src="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/e99209bb7b4f48fe957f4a351931e371~tplv-k3u1fbpfcp-jj-mark:3024:0:0:0:q75.awebp#?w=1920&h=912&s=466250&e=jpg&b=101624" alt="04.png" loading="lazy"></p>
<p>我們什么都沒輸入就開始生成視頻了蔬啡?</p>
<p>原因是 Deforum 默認給我們填好了一些參數(shù)诲侮。</p>
<p>點開提示詞可以看到一段 JSON</p>
<pre><code lang="json"><span data-line-num="1"><span>{</span></span>
<span data-line-num="2"> <span>"0"</span><span>:</span> <span>"tiny cute bunny, vibrant diffraction, highly detailed, intricate, ultra hd, sharp photo, crepuscular rays, in focus"</span><span>,</span></span>
<span data-line-num="3"> <span>"30"</span><span>:</span> <span>"anthropomorphic clean cat, surrounded by fractals, epic angle and pose, symmetrical, 3d, depth of field"</span><span>,</span></span>
<span data-line-num="4"> <span>"60"</span><span>:</span> <span>"a beautiful coconut --neg photo, realistic"</span><span>,</span></span>
<span data-line-num="5"> <span>"90"</span><span>:</span> <span>"a beautiful durian, award winning photography"</span></span>
<span data-line-num="6"><span>}</span></span>
</code></pre>
<p>這段 JSON 的意思是:</p>
<ul>
<li>第0幀要生成:可愛的小兔子,明亮的衍射星爪,非常詳細浆西,復雜,超高清顽腾,清晰的照片近零,黃昏光線,聚焦</li>
<li>到了30幀要生成:擬人化干凈的貓抄肖,被分形包圍久信,史詩般的角度和姿勢,對稱漓摩,3d裙士,景深</li>
<li>到了60幀要生成:一個美麗的椰子——底片,逼真</li>
<li>到了90幀要生成:美麗的榴蓮管毙,獲獎攝影</li>
</ul>
<p>需要注意的是腿椎,這段 JSON 用的是標準 JSON 格式,key 和 value 都要用雙引號包著夭咬,最后一段不需要添加逗號啃炸。</p>
<p><img src="https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/e5143497ebec41c9901186d349f11cde~tplv-k3u1fbpfcp-jj-mark:3024:0:0:0:q75.awebp#?w=1920&h=912&s=468967&e=jpg&b=111826" alt="05.png" loading="lazy"></p>
<p>等待一段時間就會得到一個視頻。</p>
<p>這個原理其實和圖生圖有點類似卓舵,基于提示詞以及上一幀畫面去生成下一幀畫面南用。</p>
<p>你可以根據(jù)自己想要的內容去寫提示詞,天馬行空一點也沒關系掏湾。</p>
<p>根據(jù)需求去設置視頻的寬高裹虫,在“運行”面板可以設置。</p>
<p><img src="https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/bfafdfb637a54d8bae7596f78c68b327~tplv-k3u1fbpfcp-jj-mark:3024:0:0:0:q75.awebp#?w=925&h=819&s=174731&e=jpg&b=131a2a" alt="06.png" loading="lazy"></p>
<p>而關鍵幀面板呢融击,可以設置視頻的總幀數(shù)筑公、動畫模式(2D或者3D)。頁面往下拉還可以看到“運動”這個面板尊浪,在這里可以根據(jù)自己需求設置運鏡方式十酣。</p>
<p><img src="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/75496a5c507b4ffc85b7086066d02002~tplv-k3u1fbpfcp-jj-mark:3024:0:0:0:q75.awebp#?w=917&h=912&s=188643&e=jpg&b=131a2b" alt="07.png" loading="lazy"></p>
<p><img src="https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/57dd95f07d154313955b549ef22d71e4~tplv-k3u1fbpfcp-jj-mark:3024:0:0:0:q75.awebp#?w=420&h=420&s=4789495&e=gif&f=98&b=b4d6bc" alt="01.gif" loading="lazy">
在生成文章開頭的那個視頻效果,用到的提示詞是:</p>
<pre><code lang="json"><span data-line-num="1"><span>{</span></span>
<span data-line-num="2"> <span>"0"</span><span>:</span> <span>"A whimsical forest with giant mushrooms glowing in various colors, and strange creatures peeking from behind trees."</span><span>,</span></span>
<span data-line-num="3"> <span>"30"</span><span>:</span> <span>"A river of liquid light flows through the forest, with luminescent fish swimming against the current, casting a magical glow."</span><span>,</span></span>
<span data-line-num="4"> <span>"60"</span><span>:</span> <span>"Floating islands in the sky, each with its own unique ecosystem and creatures."</span><span>,</span></span>
<span data-line-num="5"> <span>"90"</span><span>:</span> <span>"A meadow where flowers bloom in rapid succession, changing colors and shapes in a mesmerizing dance."</span><span>,</span></span>
<span data-line-num="6"> <span>"120"</span><span>:</span> <span>"A bustling fantasy city with streets lined with floating lanterns and buildings with intricate, otherworldly architecture."</span></span>
<span data-line-num="7"><span>}</span></span>
</code></pre>
<p>然后我還輸入了正向提示詞鎖定視頻整體的風格际长,正向提示詞我輸入了 <code>Retro Ghibli scene</code>耸采,這是宮崎駿動漫的風格。</p>
<p>你的視頻最終出來的風格和質量和你選擇的模型也有很大關系工育。</p>
<p>以上就是本期的教程虾宇,用這個方法還可以將你的logo制作成動畫,這個案例放在下期再講~</p>
<p><strong>點贊 + 關注 + 收藏 = 學會了</strong></p></div><blockquote><p>本文使用 <a href="http://www.reibang.com/p/5709df6fb58d" class="internal">文章同步助手</a> 同步</p></blockquote>