SwarmUI free Kaggle Account Notebook Full Tutorial - SD 1.5, SDXL, SD 3.5, FLUX, Hunyuan, SkyReels #115
FurkanGozukara
announced in
Tutorials
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
SwarmUI free Kaggle Account Notebook Full Tutorial - SD 1.5, SDXL, SD 3.5, FLUX, Hunyuan, SkyReels
Full tutorial: https://www.youtube.com/watch?v=VR1s7LxK5ZU
You want to use latest generative AI models but your computer is weak and you don't want to pay money to online services? Then you are at the right tutorial. By utilizing the most advanced UI, the SwarmUI, we are going to use the very best and latest generative AI models on a free Kaggle account. Kaggle provides 2x T4 GPU for free for 30 hours every week. With SwarmUI and my specially crafted notebook and free GPUs of Kaggle, you can use Stable Diffusion 1.5 (SD 1.5), Stable Diffusion XL (SDXL), Stable Diffusion 3 (SD 3), Stable Diffusion 3.5 - Medium and Large, FLUX DEV, FLUX Fill (inpainting), FLUX Redux, FLUX Canny, FLUX Depth, Hunyuan text-to-video, SkyReels text-to-video and image-to-video, Mochi text-to-video and many other generative AI models easily.
🔗 Kaggle Notebook Shared Post (the one used in the tutorial)⤵️
🔗 SwarmUI Mega Tutorials Playlist⤵️
🔗SECourses 10000+ Members Discord⤵️
🔗SECourses Amazing Generative AI GitHub⤵️
🔗SECourses AI APPs Index⤵️
🔗RTX 5090 Benchmarking Video Series Playlist⤵️
00:00:00 Introduction to the tutorial
00:00:16 How to download Kaggle notebook and load it into Kaggle and start installation
00:01:06 Kaggle configuration before starting the notebook
00:01:24 How to start Kaggle session and start installation of SwarmUI on a free Kaggle account
00:02:50 How to understand Kaggle cell execution / installation has been completed
00:03:11 How to clear cell execution outputs / logs
00:03:42 How to disable of downloading certain models in given cell / preventing that line execution
00:03:53 How to check how much disk space you have on Kaggle and how much left to use
00:04:11 Some of the models we preset put into Kaggle
00:05:10 How to learn more information about SwarmUI and how to use it
00:05:42 How much model download speed we are reaching with specially crafted downloader for Kaggle
00:06:01 How to install and start SwarmUI after download of models have been completed
00:07:03 When do we click visit site to access SwarmUI
00:07:28 Which options you need to select when installing SwarmUI on Kaggle
00:08:19 How to set backends of SwarmUI and change root folder path on Kaggle
00:09:08 How to see detailed logs of what is happening in debug menu of SwarmUI
00:09:18 How to set root folder path to Kaggle temp path we are using - mandatory
00:09:53 How to start using after SwarmUI is ready and set parameters of Hunyuan fast video model
00:12:26 How to stop SwarmUI, load a new model, and start SwarmUI again
00:14:02 Restarting SwarmUI on Kaggle
00:15:28 Generating an image with a SDXL model as an example
00:16:40 Generating a video with fast Hunyuan Q4 model
00:16:57 How to set Sigma Shift parameter
00:19:45 How to download SwarmUI generated videos and images on Kaggle as a single zip file
Below songs used with -40 sound level
0 Song: Cartoon, Jéja - Why We Lose (feat. Coleman Trapp) [NCS Release]
Music provided by NoCopyrightSounds
Free Download/Stream: http://ncs.io/whywelose
Watch: http://youtu.be/zyXmsVwZqX4
1 Song: Unknown Brain - Superhero (feat. Chris Linton) [NCS Release]
Music provided by NoCopyrightSounds
Free Download/Stream: http://ncs.io/superhero
Watch: http://youtu.be/LHvYrn3FAgI
2 Song: Unknown Brain - MATAFAKA (feat. Marvin Divine) [NCS Release]
Music provided by NoCopyrightSounds
Free Download/Stream: http://ncs.io/MATAFAKA
Watch: http://youtu.be/AlXfbVpDUdo
3 Song: Robin Hustin x TobiMorrow - Light It Up (feat. Jex) [NCS Release]
Music provided by NoCopyrightSounds
Free Download/Stream: http://ncs.io/LightItUp
Watch: http://youtu.be/bdE_SyHad90
4 Song: Egzod, Maestro Chives, Neoni - Royalty [NCS Release]
Music provided by NoCopyrightSounds
Free Download/Stream: http://ncs.io/Royalty
Watch: http://ncs.lnk.to/RoyaltyAT/youtube
5 Song: Lost Sky - Where We Started (feat. Jex) [NCS Release]
Music provided by NoCopyrightSounds
Free Download/Stream: http://ncs.io/WhereWeStarted
Watch: http://youtu.be/U9pGr6KMdyg
6 Song: Dirty Palm - Freakshow (feat. LexBlaze) [NCS Release]
Music provided by NoCopyrightSounds
Free Download/Stream: http://ncs.io/Freakshow
Watch: http://youtu.be/2jwj9wVx3mg
Video Transcription
00:00:00 Greetings everyone. In today's video, I am going to show you how to use SwarmUI on a free Kaggle
00:00:07 account, so that you don't need to pay to any online services. This is especially useful if
00:00:14 you don't have a powerful GPU. The link of this post will be in the description of the video. Just
00:00:20 download the latest installer, you can download it from here. Then go to Kaggle, register an account
00:00:26 and verify your phone number. This is mandatory. After you have verified your phone number, click
00:00:32 create, new notebook. Wait for editor to be loaded like this. Once you get this screen, click file,
00:00:41 import notebook. Then you can drag and drop the downloaded file to here, or you can click browse
00:00:47 files and select the downloaded notebook like this. Then click import. Once you see the file
00:00:56 has been imported like this, you can click X icon here. You don't need to wait fully, but you can
00:01:04 also wait, it's an option. After that, verify that accelerator is selected as GPU T4 x2 and internet
00:01:15 is on. This is mandatory, otherwise it will not work. Then we will start our session. This is
00:01:21 the first cell that we need to install, so let's start our session from here. Wait for session to
00:01:29 be started. Once you see a green circle here, you see, it says running. Click here and verify that
00:01:37 you have the GPU and everything is working as expected like this. Then click this cell. When
00:01:46 you click this cell, you can either click here to play it, or you can click here to play it. You
00:01:51 see run current cell. But make sure that you have selected the accurate cell. Then let's click this,
00:01:58 and it will start installation of the necessary libraries to run the SwarmUI on a free Kaggle
00:02:04 account. With this SwarmUI, you can use FLUX Dev model, SDXL model, Stable Diffusion 1.5 model,
00:02:12 Stable Diffusion 3.5 model, Hunyuan video model, Mochi video model, whatever SwarmUI supports, you
00:02:22 can use it here, as long as it doesn't exceed the requirements. Because we have only 29 gigabytes
00:02:32 of RAM and we have GPUs that are 15 gigabytes. However, since we have two GPUs here, we can
00:02:40 generate two images or two videos at the same time, as long as they are fitting into GPU and
00:02:47 they are not causing out of RAM error. So you see, this cell execution has been completed because
00:02:56 there is not anymore running icon here. You can also see the status from here as well. There is
00:03:02 no running icon anymore. Then scroll down. You can see the installation logs like this when you are
00:03:09 scrolling down. Or you can right click and you can say clear outputs of all cells, so that it
00:03:18 will clear all the installation logs. After that, go to the Step 1 cell. So we have a lot of cells
00:03:27 to automatically download the models. The favorite models that you might enjoy. Like this cell will
00:03:35 download SDXL models or Stable Diffusion 1.5 models. We have set some models for you
00:03:41 to automatically download. If you don't want to download a certain model, you can put a hashtag in
00:03:47 front of that model and it will disable download of that model. Since we have limited space on
00:03:56 Kaggle, you see we have 57 gigabytes of disk space total, we cannot download every model. You need to
00:04:03 pay attention to the models that you need, that you are going to use after the installation. So
00:04:08 download the models accordingly. For example, this cell will download the very best deterministic
00:04:15 upscale models. This cell will download a better clip model for the FLUX. This cell will download
00:04:21 FLUX Dev model, Stable Diffusion 3.5 large model. This cell will download the FLUX Redux model. So
00:04:30 read every one of the cells and decide which ones you want to download according to your needs. For
00:04:38 example, this cell will download the Hunyuan text to video model. This is higher quality model, 20
00:04:46 steps. It is going to download Q6 GGUF model. This cell will download faster Hunyuan video model. This
00:04:57 is 6 steps model. So read all of the cells and download whichever model you need. I am going to
00:05:05 download this fast model to generate some example videos. We already have amazing SwarmUI tutorials
00:05:13 playlist, so you can look at our playlist and watch all of our SwarmUI tutorials to learn more
00:05:22 about SwarmUI. Hopefully, I will put the link into the description of the video, so you can quickly
00:05:28 navigate to there to learn how to use SwarmUI with different models and its different features. Once
00:05:35 you have installed, everything is exactly same to use on Kaggle. So the download was extremely fast.
00:05:42 You see 678 megabytes per second. This is also an optimization that I do. So it took 27 seconds to
00:05:52 download. So after you have checked everything and you are ready to use SwarmUI, you downloaded all
00:05:59 the models. We are going to use this to be able to connect the SwarmUI interface. So click this
00:06:06 link. Register a free account. You can register any account. Then click to copy your token like
00:06:16 this. Then you will see put your token here, put your token there. Then when this cell is selected,
00:06:24 click play icon once. You can run from here or from here. Let's run from here. Then you will get
00:06:31 a link like this. Open this link by clicking that and you will get to this page. However,
00:06:37 do not click visit site yet. We only click visit site when the application is running at localhost.
00:06:46 I will show you what I mean. Get to Step 3 cell. This cell will install the SwarmUI and
00:06:53 start it. So click to run that cell and just wait until you see this. Let me show you what you
00:07:02 are going to see. You are going to see starting web server on http://0.0.0.0:7801. This means that the
00:07:13 application started locally on the Kaggle server. However, to be able to access it, we need a public
00:07:20 endpoint, which is this link. Now click visit site and the SwarmUI interface will load. On Kaggle,
00:07:29 we are using pre-installed ComfyUI backend, which we have installed at the very first cell
00:07:37 that we have run. So click agree. Click customize settings. This is super important. Click next.
00:07:44 Select the theme you want. Next. Just yourself on this PC. Next. And this is crucial, none. Select
00:07:52 none because we are going to use pre-installed ComfyUI backend. So this is important. Select
00:07:59 none and click next. Do not download any model because we have downloaded everything we needed
00:08:05 into the temp disk because it is the bigger disk. Then click next. Then yes, I am sure install now.
00:08:13 It will be almost instant like this because we didn't install any backend and it is done. Now,
00:08:20 we are going to add backends. So click server, click backends and click ComfyUI self starting.
00:08:29 Click okay. Then click ComfyUI self starting again and click okay. Then go back to the Kaggle
00:08:36 notebook editor and go back to the top of the Step 3 cell. You will see that there is this
00:08:44 text after SwarmUI started first add. So select this part and copy it. Go back to the SwarmUI
00:08:51 interface. Paste it here. Then make the GPU ID of the second one as GPU ID 1. Then click save
00:09:01 and click save. Now it will start the backends, install the missing libraries or anything. You can
00:09:09 go to logs, click debug and watch the progress. There is one another thing that we have to make
00:09:16 which is server configuration. Click server configuration, return back to Kaggle and you see
00:09:22 there is this folder, Kaggle temp. Copy it. Return back to SwarmUI interface. Paste it here. You
00:09:29 see model root. Once you paste it and click it another cell, you will see that there is save.
00:09:35 So click save. So now it will change the model root and it will load the backends. We don't need
00:09:42 to restart SwarmUI multiple times anymore because this will work perfectly now. Just go to logs and
00:09:48 watch in the debug and you see loading backends disappeared. So the SwarmUI is ready to use. So
00:09:56 click models and click refresh. Currently we only downloaded fast Hunyuan video because everything is
00:10:02 same as in other tutorials, just watch them. But I will make an example of Hunyuan video. So
00:10:08 click this. And once you clicked it, you see it is selected. This is a fast model so it is 6 steps.
00:10:16 But before doing that, we need to install a node, if I remember correctly. So click this hamburger
00:10:23 menu and click load now. And you see it is asking me to install GGUF support. So install and okay.
00:10:33 Just wait for installation to be completed. You see it says backends are still loading because
00:10:38 it installed the necessary library and it is reloading the backend and now it is done. Then we
00:10:45 can continue setting up the necessary parameters. This is CFG 1 and click display advanced options. I
00:10:52 am going to make another tutorial for Hunyuan video, but I am showing here quickly so that you will see
00:10:58 there is text to video now. You can set number of frames, FPS, another thing. Let's just generate
00:11:04 25 frames, so it will be one second video. And it is 6 steps, CFG scale 1. In the sampling,
00:11:13 we are going to make the FLUX guidance scale 10. This is for fast Hunyuan video and we are
00:11:19 also going to change something else which is in the advanced sampling and Sigma Shift,
00:11:26 it is 17. I will use an example prompt that I have found on the internet. This is an example
00:11:33 prompt for Hunyuan video. You can read this, just pause the video and read it and click generate.
00:11:41 Now let's watch how much time it is going to take. I hope that it won't take too long because we have
00:11:47 limited VRAM. So first of all, it will download the necessary missing models, then it will start
00:11:54 generation. You can always watch the status from the debug menu. So it is downloading the LLAVA LLAMA3
00:12:01 FP8 scaled version automatically. You can also monitor some of the progress on the Kaggle
00:12:09 notebook as well. So let's just wait. Okay, so the model has been downloaded and the video generation
00:12:16 started. However, there is an error, the mistake, which is that it is using our entire GPU memory,
00:12:26 therefore it is just too slow. So what I am going to do is, I have replaced the download
00:12:32 with Q4 instead of the Q6, so it will use lesser VRAM, therefore it should work faster. So how
00:12:40 am I going to do that? By the way, in your case, when you download the notebook, you will get the
00:12:46 updated Kaggle notebook, not the Q6 version. But you will learn how to cancel and run the
00:12:53 application again when you want to download a new model or make changes. So cancel run,
00:13:00 and the run has been cancelled. Let's redownload the Q4 version. So I will click this and it should
00:13:06 redownload very fast. Yes, we can see the speed here. So it is around 700 megabytes. Let me also
00:13:15 update the notebook. Okay. And you can watch the disk space that you are using, so you won't
00:13:23 get out of disk space. Okay. Disk space may get updated a little bit later. Let's also download
00:13:31 some of the SDXL models, so I can also show you how to use them. The SDXL model download was step
00:13:37 1, so I will run this cell. It will download the SDXL models extremely fast. Just wait until cancel
00:13:46 run disappears. Okay, new downloads have been completed. Now we are using around 50 gigabytes
00:13:54 of disk space. Now we will restart the SwarmUI. But we don't need to reinstall. How to restart?
00:14:02 Go to Step 2 cell again, run it. Get a new link here, open it. But do not click visit site yet.
00:14:10 Scroll down to the Step 4 and just execute it. And when you see that starting web server on this
00:14:18 local URL, you are ready. Click this cell. Go to the link and visit site. Okay. It is asking
00:14:26 us to reinstall, this shouldn't happen normally. However, on Kaggle, this can happen sometimes,
00:14:32 so if you encounter that, don't get confused. So we are going to reinstall quickly as before. Next,
00:14:42 next. Okay. So it should be instant. Yes. The bad side of this is that we need to re-add the
00:14:51 backend. So we will do that. Unfortunately, on Kaggle, it is not as easy as using in our own
00:14:59 PC. Scroll back top of the Step 3. Copy the backend link, this one, pay attention. Copy paste
00:15:08 here and here. Set the GPU ID, save, save. Go back to server configuration. Copy the folder path like
00:15:17 this. Change here and save and wait for backends to be loaded. You can monitor logs, debug. Okay,
00:15:26 it is loaded. Go to back to the generate and click models, refresh. Don't forget to refresh. Now we
00:15:34 have different models. Let's generate an image with the Realistic Vision XL version 5. This is
00:15:40 an SDXL model. Let's say super fast car. Then I will try Hunyuan Q4 GGUF model. First, it will
00:15:51 load the model, then it will start generation. You can watch logs in here in the server logs.
00:15:59 This should be pretty fast compared to the Hunyuan video. You can watch the status here also. You see
00:16:06 1 current generation, 1 queued, 1 waiting on model load. Okay, model loaded and generation
00:16:13 has been started and we should get the results in a few seconds. We can see the speed here.
00:16:19 It is 1.23 IT per second and the image has been generated. Yes. You see it is working perfect.
00:16:28 Now let's try again the fast Hunyuan. By the way, it still shows the Q6 because we had downloaded it,
00:16:37 but we are going to select Q4. Okay, let's select it. We need to reset the parameters, CFG 1, 6
00:16:46 steps. Let's click load model. Okay. You see this time it didn't ask me to reinstall the necessary
00:16:54 node because it was installed. Then click display advanced options. We are going to select the
00:17:00 sampling and FLUX guidance scale as 10 and we are going to set the Advanced Sampling Sigma
00:17:07 Shift 17. And let's copy paste our prompt. Okay and generate a video. Let's see how it will work.
00:17:18 You can also change the video format from here to GIF, WebM or MP4. This will change the extension,
00:17:28 the video file format that it is going to generate. Let's go to server and let's see. Okay,
00:17:35 it gave some errors, but I think it is fixing itself. Let's see. I think it is getting loaded
00:17:42 right now. Yes, you can also see the status here. You see the RAM is increasing. That means that it
00:17:49 is loading the model into the RAM first, then it will load it into the GPU memory. Okay, this time
00:17:56 it loaded it into our second backend into the GPU ID 1, you can see that. It is only using 11.9
00:18:04 gigabytes of VRAM memory right now, so the speed should be relatively faster than the Q6 model.
00:18:13 However, still, the GPUs on the Kaggle is slow, therefore it will take time. And as you generate
00:18:19 a bigger frames having video, it will take even longer, or if you generate a bigger resolution,
00:18:26 it will take longer. This is just a demonstration how it works on Kaggle. How to use the SwarmUI,
00:18:34 watch the tutorials and I am hopefully going to make another tutorial, a more detailed tutorial
00:18:39 for Hunyuan video. Okay, so the video generation has been started. However, it is extremely slow due
00:18:47 to the GPU of the Kaggle. One step is taking 900 seconds. So if you are not in hurry, you can of
00:18:56 course generate video and wait it to be completed because Kaggle provides 30 hours of free GPU time
00:19:05 every week. We can see that, let me show you. Okay, you see that I have left 28 hours of GPU
00:19:15 time for this week. This is weekly and for free. However, it is just extremely slow for this model,
00:19:22 but you can use it for SDXL, FLUX Dev, Stable Diffusion 3.5, SD 1.5, even Mochi video model.
00:19:33 So currently this is the speed, it may get faster when you are using this tutorial, but you know,
00:19:39 I am teaching you how to use and the rest is up to you to figure it out how you want to use it.
00:19:45 So how you can download the generated videos or images? Once you are done with everything,
00:19:53 click cancel run here. Then go to the very bottom cell and click this play icon. This is usually the
00:20:01 way I develop my Kaggle notebooks and you see it has generated a zip file. This zip file will be
00:20:08 here. Click this icon, it will list then you see there is generated zip. So click here and download
00:20:16 and it will download all the generations you have made on Kaggle as a single zip file. It will make
00:20:23 your life easier. Hopefully see you in the future videos. Please subscribe. I will keep updating and
00:20:31 improving this notebook for SwarmUI and if you have any questions, just reply to the Patreon
00:20:38 post or this video and hopefully see you later. Don't forget to join our Discord channel as well.
Beta Was this translation helpful? Give feedback.
All reactions