Generate AI Videos With AnimateDiff & ComfyUI | Text to Animation Tutorial

MDMZ www.youtube.com

סיכום תמציתי

הדרכה זו מלמדת כיצד ליצור אנימציות AI מדהימות מהנחיות טקסט באמצעות AnimateDiff בתוך ComfyUI. הוא מכסה את תהליך ההתקנה, הגדרות חיוניות להשגת תוצאות מצוינות, ושיטות לשדרוג איכות הווידאו.

  • התקנת ComfyUI ומנהל ComfyUI.
  • התקנת AnimateDiff והגדרת מודולים חיוניים.
  • יצירת אנימציות והתאמת הגדרות.
  • שיפור איכות הווידאו באמצעות ComfyUI ו-Topaz Video AI.

ComfyUI לעומת A1111

הסרטון משווה בין ממשק Automatic 1111 ל-ComfyUI, ומציין שלמרות שממשק Automatic 1111 פשוט וקל לשימוש, ComfyUI עולה עליו בהיבטים רבים. ComfyUI עשוי להיראות מרתיע בהתחלה, אך הוא מציע ביצועים טובים יותר.

כיצד להתקין את ComfyUI

ההדרכה מספקת קישור להורדת ComfyUI. משתמשי Windows יכולים להוריד את הקובץ, לחלץ אותו באמצעות WinRAR, ולהגדיר את תיקיית ComfyUI הראשית. השלב הבא הוא התקנת מנהל ComfyUI מ-Civit AI, אשר מאפשר הורדת הרחבות וצמתים מותאמים אישית. לאחר ההורדה, יש לחלץ את הקבצים ולהפעיל את קובץ ה-batch החדש כדי להתקין את המנהל. משתמשי Nvidia GPU יכולים להשתמש בקובץ ה-batch של Nvidia GPU, בעוד שאחרים יכולים לבחור באפשרות CPU, אם כי זה יאט את הביצועים. ComfyUI יופעל בדפדפן.

מבצע נהדר מבית Skillshare

Skillshare היא קהילת למידה מקוונת המציעה אלפי שיעורים שנוצרו על ידי מובילי תעשייה לאנשים יצירתיים. Skillshare מציעה שיעורים על כלי AI חדשים ומשופרים, ומאפשרת למשתמשים ללמוד מיומנויות חדשות ולשפר את כישורי האמנות הדיגיטלית שלהם. לדוגמה, השיעור "Make AI Work for You" מלמד כיצד להשתמש ב-ChatGPT וב-Adobe Firefly כדי לקבל השראה ולייעל את התהליך היצירתי. 500 הנרשמים הראשונים דרך הקישור יקבלו גישה חופשית לספריית השיעורים למשך חודש שלם, בתוספת 40% הנחה על השנה הראשונה של חברות ב-Skillshare.

ממשק ComfyUI

ממשק ברירת המחדל של ComfyUI דומה ל-Automatic 1111, אך עם חיבורים באמצעות צמתים שניתן לשנות כדי ליצור תהליכי עבודה מותאמים אישית.

כיצד להתקין את AnimateDiff

כדי להתקין את AnimateDiff, יש לפתוח את מנהל ComfyUI ולחפש את AnimateDiff, ולהתקין את הגרסה של Kosinkadink. לאחר ההתקנה, יש להוריד את מודולי התנועה מדף Hugging Face ולשמור אותם בתיקיית המודלים של AnimateDiff בתוך תיקיית הצמתים המותאמים אישית של ComfyUI. בנוסף, יש להוריד את קובץ ה-VAE מדף אחר ולשמור אותו בתיקיית ה-VAE בתוך תיקיית המודלים של ComfyUI. לאחר מכן, יש להפעיל מחדש את ComfyUI.

ייבוא תהליך העבודה של AnimateDiff

ניתן לייבא תהליך עבודה של AnimateDiff על ידי גרירת תמונת מסך של תהליך העבודה לממשק ComfyUI. תהליך העבודה ייטען באופן מיידי ויהיה מוכן לשימוש.

הגדרות AnimateDiff חלק א'

הצומת הראשון מאפשר בחירת מודול AI לטעינה, כמו Dream Shaper או Ghost Mix. ניתן להוריד מודלים מ-Civit AI ולטעון אותם על ידי רענון רשימת הנפתחת. ניתן לשנות את ערך ה-Seed, ואפשרות ה-"Randomize" תיצור דור שונה בכל פעם. ניתן לשנות את ממדי הפלט, כאשר רזולוציה נמוכה יותר מאיצה את העיבוד. גודל ה-Batch קובע את מספר הפריימים שיוצגו, כאשר מודול v14 מאפשר עד 24 פריימים, אך מומלץ להשתמש ב-16 פריימים לתוצאות טובות יותר.

הנחיות ב-AnimateDiff

כתיבת הנחיה מנוסחת היטב חיונית לתהליך היצירה. ישנם אתרים רבים שבהם ניתן למצוא הנחיות טובות. אתרים מסוימים מציעים גם הנחיות שליליות כדי למנוע יצירת תמונות מוזרות.

הגדרות AnimateDiff חלק ב'

בדרך כלל, מגדירים את הצעדים ל-30, כאשר יותר צעדים בדרך כלל משפרים את האיכות. ערך ה-CFG קובע עד כמה ה-AI צריך לעקוב אחר ההנחיה, כאשר 5 הוא ערך התחלתי טוב. יש להגדיר את הדוגם ל-DPM++ 2M SDE ואת המתזמן ל-Karras. ניתן להתאים את קצב הפריימים, ובסך הכל של 16 פריימים, ניתן להגדיר את ה-FPS ל-8 כדי לקבל אנימציה באורך 2 שניות.

יצירת אנימציות ב-AnimateDiff

לאחר הגדרת כל ההגדרות, יש ללחוץ על כפתור "Q prompt" כדי להתחיל ליצור. התהליך יעבור בין הצמתים אחד אחד, וייתכן שיחלפו מספר דקות בהתאם להגדרות ולמערכת. האנימציות מאוחסנות בתיקיית הפלט, כאשר כל אנימציה נשמרת יחד עם תמונת PNG. ניתן לגרור ולשחרר את קובץ ה-PNG לתוך ComfyUI כדי לייבא את תהליך העבודה.

כיצד לייבא הגדרות

ניתן לייבא הגדרות על ידי גרירת קובץ PNG לתוך ComfyUI כדי לייבא את תהליך העבודה.

חבילת אנימציה

קיימת אוסף של 100 דורות אנימציה בעמוד הפטריאון, שניתן להשתמש בהם כהשראה או כנקודת התחלה להתנסות בהגדרות.

כיצד לשדרג סרטון עם ComfyUI

כדי לשפר את האיכות והרזולוציה של הפלט, ניתן להשתמש באחד מתהליכי העבודה של שדרוג הזמינים במדריך. לאחר הבאת תהליך העבודה לתוך ComfyUI, יש לעדכן את הכניסות עם אותן הגדרות ששימשו עבור האנימציה הקודמת ולבחור יחס שדרוג, כמו פי שניים. לחיצה על "Q prompt" תיצור פלט מפורט ואיכותי יותר.

כיצד לשדרג סרטון עם TopazLabs

שיטה מהירה יותר היא שימוש ב-Topaz Video AI. לאחר ייבוא האנימציה, יש להגדיר את יחס השדרוג לפי שניים בהגדרות הווידאו. במקטע השיפור, מודל ה-AI TAA עובד מצוין עם סרטוני אנימציה. ניתן להתאים את ההגדרות, כמו חידוד והפחתת רעש ל-10. לאחר מכן, יש ללחוץ על ייצוא, והקובץ המשודרג יישמר ליד האנימציה.

יש לי שאלה

הסרטון מזמין את הצופים לשתף את מחשבותיהם על ComfyUI בתגובות.

Summarize any YouTube video in seconds

Get summaries like this one for any video, in your language, with the free Summ app.

Download on the Apple Store
Get it on Google Play

Transcript

YouTube Transcript Generator

0:00 [Music] in this tutorial we're going to learn how to generate stunning AI animations using animate div all from text prompts I will walk you through the installation process and share essential settings to help you achieve excellent results I understand that many of you like to run stable diffusion using the automatic 1111 interface because it's simple and easy to use but in this video I decided to go with comy UI instead it might seem a little intimidating at first but trust me when I say that comy UI is set to outperform the a111 interface in many aspects and I promise you the installation process is a piece of cake I will leave a link below where you can download comy UI if you're a Windows user like me scroll down and

0:46 look for the download link right click on it and choose save as to download you can choose to save your comy UI folder on your desktop or any location you prefer once you've selected the location and saved it a compressed file will be downloaded you can use windr to extract it in the same location and the extracted folder will be your main confy UI directory next thing we need to install is the confy UI manager which we can later use to download extensions and custom nodes you can find it on civit AI along with useful instructions and I will leave a link to it down below make sure you save the file in your comyy directory after downloading extract this and run the new batch file to install the confi manager if you have an Nvidia GPU you can use the Run Nvidia GPU batch

1:31 file otherwise you can go with the CPU option however using this will greatly slow down the performance of comy UI and either way kyui will launch on your browser so before we get into more technical stuff if you're interested in diving into the world of AI and picking up some new skills you need to hear about the great deal that today's sponsor has for you skillshare is this awesome online learning community that gives you access to thousands of classes created by industry leaders specifically for Creative People Like Us With skillshare You Can level up pure AI art while also exploring a whole bunch of other topics like photography freelancing and more with the rise of new and improved AI tools skillshare offers classes on how to use these tools in a practical way so I personally went

2:17 for this make AI work for you class by smsh mystery smsh is this cool designer and illustrator who has figured out how to use AI to come up with ideas and make his creative process much more efficient in this class he breaks down how to use chat GPT and Adobe Firefly to get inspiration references and discover precise techniques to level up your artwork whether you're looking to learn the basics of a new skill or start your own business skillshare classes like this are designed to take you from a beginner to an expert and hey if you're one of the first 500 people to sign up through the link below you will be awarded free access to the whole class library for an entire month and as an added bonus you will get a 40% off your first year of skillshare membership this

3:03 is the default interface of confy UI it has similar features and settings as automatic 1111 but with the difference that everything is connected by nodes and you can change these connections to create your own workflows now that we have comi ready let's look at how to get anime diff to work I will guide you on how to install and use anime diff but I also recommend that you bookmark this GitHub page for future reference to explore different use cases and stay updated with new features to install anime diff open the confi manager and click on install custom nodes to find anime diff just do a quick search you will see two options and make sure you install the one by coing cic once the download is complete you will be asked to restart confy UI however before doing so there are two more things that we

3:49 need to download real quick first you need to get the motion modules from this hugging face page that I will link below look for these three checkpoint files to download this v14 file for example right click on the download button and go to confy UI custom nodes open the animated folder go to models and save the file there and simply do the exact same thing for the remaining two modules you will also find other motion Laura files these new moduls are meant for controlling camera movement in anime div so let me know if you'd like to see another video on that finally head over to this page to download the vae file make sure you pick the safe tenser version right click here's download load go to confy UI

4:35 models open the vae folder and save the file there and now we can restart confy UI close this tab and the terminal then run the batch file again to start comy UI in your browser the default workflow here is different from what we need for the animations however in the anime diff guides if you scroll down the first text to image sample you will find a workflow that is a really good starting point and instead of manually copying the settings over you can download the workflow screenshot into your computer and here's my favorite thing about comy UI you can simply drag and drop the image into your interface and voila the workflow will instantly load and be ready to go so let's go through the nodes here and see how you can customize this the first node allows you to select which AI modu

5:21 to load you can either stick with the default option or choose a different one and I've been getting really good results with models like dream shaper and ghost mix let's go with the dream shaper model for this demo you can find it on CV it AI just right click on the download button and choose save file as go to confy UI modules open the checkpoint folder and hit save once the download is finished click on refresh and you'll now be able to load available models by clicking on this drop- down list let's load dream shaper next be sure to click on the Subscribe button so you don't miss any future uploads I plan to create more advanced tutorials on anime div in the near future here you can change the seed value if you switch it to randomize you will get a significantly different generation each

6:07 time over here you can choose to change the output Dimension I'm going to set mine to Vertical 512x 768 I often go with a reasonably low resolution for faster processing but I will show you later how to quickly upscale and drastically improve the quality of your outputs the batch size setting is simply the number of frames you want to render right now you're limited to a maximum number of frames depending on which motion module you use the v14 module allows you to render a maximum of 24 frames however I found that I get better results with 16 frames now let's move on to what is probably the most important part of the generative process and that is prompting now if you're familiar with generative AI you probably know that writing a well-crafted diffusion prompt

6:54 requires a certain level of skill but if you're new to this do not worry because there are many websites available where you can find really good good prompts and I've made an entire video about this so be sure to check it out for instance I'm using a prompt that I found on CR some websites also have negative prompts which you can use to avoid generating strange images you can find both prompts I'm using here in the description box and although this doesn't guarantee the exact same outcome it's a good way to start experimenting and learning how to write your own prompts moving on to the rest of the settings I usually set the steps to 30 generally speaking the more steps you use the better quality you will achieve the CFG value will determine how much the AI should follow your prompt and I find five to be a good

7:41 value to start with set the sampler to DPM PP 2m sde and the scheduler to caras you can also adjust the frame rate with a total of 16 frames I will set my FPS to 8 so I can get a 2 second long animation and all that's left to do now is click on the Q prompt button to start generating and here comes the Moment of Truth the process is going to go through the nodes one by one and it might take a bit of time depending on your setup and settings and check this out seriously it's working but honestly I'm not super impressed with this result so let's just click on the Q prompt once again to see what else the AI can come up with now have a look guys I think I like this one

8:26 much more also keep in mind that every animation is safely stored open the output folder where you will find each animation is saved along with a PNG image right besides it and here's the really cool part take this animation for example let's say you really like it and want to use it as a base for another output what you can do here is drag and drop the PNG file into comy UI to import the workflow and I personally love this feature I've been experimenting a lot with different models prompts and settings as a result I have compiled a collection of 100 animated gen Generations on my patreon page so feel free to use these as inspiration or a starting point to play around with the settings all right now let's look at two different methods to enhance the quality

9:13 and resolution of your output the first option is to use one of the apps scaling workflows available on the guide bring the workflow into comi I've updated the inputs here with the same settings I used for the previous animation the only remaining change here is to choose an upscaling ratio let's scale it by two and click on Q prompt and you will end up with a way better output that's super detailed and high in quality the only downside is that it takes long to process a much quicker method that I like is using topas video AI just import the animation and in the video settings set the upscaling ratio to two then head over to the enhancement section for the AI model I found that TAA works great with animated videos you can play around

9:59 with the settings here let's set the sharpen and reduce noise to 10 you can tweak the output settings as you want but I personally prefer using the h264 encoder and MP4 container then just click on export and the upscaled file will be saved right next to your animation and as you can see the upscaled version looks way better than the original now I want to hear your thoughts on comy UI drop a comment below and let me know if you're going to switch to comy UI in the future other than that I hope you found this video helpful stay creative and I'll catch you in the next video peace

Share

YouTube Video Summaries