-
-
Notifications
You must be signed in to change notification settings - Fork 362
SANA Ultra HD Fast Text to Image Model from NVIDIA Step by Step Tutorial on Windows Cloud and Kaggle
SANA: Ultra HD Fast Text to Image Model from NVIDIA Step by Step Tutorial on Windows, Cloud & Kaggle
Full tutorial link > https://www.youtube.com/watch?v=KW-MHmoNcqo
Step by step tutorial and a 1-Click to installer having very advanced Gradio APP to use newest Text-to-Image SANA Model on your Windows PC locally and also on cloud services such as Massed Compute, RunPod and free Kaggle. SANA's most powerful feature is being able to generate 4 Megapixel resolution (2048x2048) very fast natively.
🔗 Full Instructions, Configs, Installers, Information and Links Shared Post (the one used in the tutorial)
🔗 SECourses Official Discord 9500+ Members
🔗 Stable Diffusion, FLUX, Generative AI Tutorials and Resources GitHub
🔗 SECourses Official Reddit - Stay Subscribed To Learn All The News and More
🔗 Official Repository of NVIDIA Labs SANA Model
00:00:00 Introduction to the published by NVIDIA SANA model step by step tutorial
00:02:48 How to install SANA model on Windows and start using
00:05:35 How to verify installation and save installation logs in case of an error to report back to us
00:06:03 How to start the APP after installation on Windows and how to use the SANA model properly
00:09:38 Where the generated images are saved in which folder
00:12:11 How to edit the styles that the APP has - prompting styles
00:12:59 How to install and use SANA APP and any of SECourses published AI apps on Massed Compute
00:14:17 How to select accurate category and the template image on Massed Compute cloud service
00:14:25 How to apply our SECourses coupon to get 50% price discount on Massed Compute - permanently working
00:14:46 How to install and setup ThinLinc client to transfer files and use Massed Compute cloud desktop PC
00:15:51 How to connect Massed Compute after initialized and install any AI scripts that we publish e.g. SANA model
00:19:05 How to start the application after it has been installed and use it on your PC (but it will run in Massed Compute server)
00:20:31 How to download individually and as a folder the generated images on Massed Compute to your computer
00:21:30 How to terminate Massed Compute to not spend any credits / money
00:22:03 How to install and use SANA APP and any of SECourses published AI apps on RunPod cloud service
00:24:43 How to start the SANA APP after installation has been completed on RunPod
00:26:34 The speed of RTX 4090 on RunPod for SANA 2K model 4 MegaPixel image generation
00:26:44 How to download individually and as a folder the generated images on RunPod to your computer
00:27:09 How to stop the pod and terminate to not waste any credits / money on RunPod
00:27:24 How to start the APP again that was previously installed on RunPod (not terminated only stopped pod)
00:27:34 How to use SANA APP on a free Kaggle account and any of my developed Kaggle notebooks
00:28:38 Selecting accurate session options on Kaggle like GPUs, accelerator and Internet On
00:29:06 How to run cells and install SANA APP or any APP on Kaggle
00:29:44 How to get Ngrok token and set it up and use it to connect SANA APP from Kaggle
00:30:57 How to download all generates images as a zip file on Kaggle
00:31:46 How to restart the SANA app on Kaggle or any AI APPs same logic
00:32:11 How to see how much GPU time you have left for free on Kaggle - 30 hours every week
Sana: Efficient High-Resolution Image Synthesis with Linear Diffusion Transformer
We introduce Sana, a text-to-image framework that can efficiently generate images up to 4096 × 4096 resolution. Sana can synthesize high-resolution, high-quality images with strong text-image alignment at a remarkably fast speed, deployable on laptop GPU. Core designs include:
(1) DC-AE: unlike traditional AEs, which compress images only 8×, we trained an AE that can compress images 32×, effectively reducing the number of latent tokens.
(2) Linear DiT: we replace all vanilla attention in DiT with linear attention, which is more efficient at high resolutions without sacrificing quality.
(3) Decoder-only text encoder: we replaced T5 with modern decoder-only small LLM as the text encoder and designed complex human instruction with in-context learning to enhance the image-text alignment.
(4) Efficient training and sampling: we propose Flow-DPM-Solver to reduce sampling steps, with efficient caption labeling and selection to accelerate convergence.
As a result, Sana-0.6B is very competitive with modern giant diffusion model (e.g. Flux-12B), being 20 times smaller and 100+ times faster in measured throughput. Moreover, Sana-0.6B can be deployed on a 16GB laptop GPU, taking less than 1 second to generate a 1024 × 1024 resolution image. Sana enables content creation at low cost.
-
00:00:00 Greetings everyone. Today I am going to introduce you text to image SANA model developed by the
-
00:00:07 NVIDIA. The advantage of this model is that it is able to generate very high resolution images,
-
00:00:14 4 megapixel at the moment in a very short time with a low VRAM memory. So, it is an amazing model
-
00:00:23 to generate fast images at high resolution. This model is not supported widely yet,
-
00:00:30 not even the ComfyUI is supporting its 4 megapixel resolution. However, I have developed a very
-
00:00:37 advanced Gradio application with one click to install on Windows and also use on cloud services
-
00:00:45 such as Massed Compute, RunPod, and even a free Kaggle account notebook. If you are a Linux user,
-
00:00:52 you can use Massed Compute or RunPod installer as well. So, what are the features and the advantages
-
00:00:59 of my Gradio application, it is supporting the latest 4 megapixel SANA 2K model with its native
-
00:01:08 pipeline. Moreover, I have improved the pipeline so that it is doing offloading and working even on
-
00:01:18 lower VRAM GPUs very fast and very efficiently. Moreover, my Gradio application is supporting
-
00:01:24 multi line prompting, so you can write a prompt to the each line and it will generate each line
-
00:01:33 separately as a new prompt. Furthermore, my Gradio application has more advanced features
-
00:01:39 such as you can set the aspect ratio and it will set the accurate resolution immediately
-
00:01:46 accordingly. Moreover, it is supporting negative prompting, image styles, randomized seed,
-
00:01:53 and batch size and number of generations. So, you can even generate three images at once or you can
-
00:02:00 set it to generate hundreds of images in a loop. All of these features are combined with multi
-
00:02:07 prompting and all of the images are saved in an properly set up outputs folder automatically. So,
-
00:02:15 in the first part of this tutorial, I will show you how to install and use on Windows
-
00:02:21 and I will teach how to use this application. Then I will show how to use on Massed Compute,
-
00:02:28 on a cloud service, if you don't have a powerful GPU, you can use Massed Compute, then I will
-
00:02:33 show on RunPod and finally I will show on a free Kaggle account, so if you don't want to pay any
-
00:02:40 money to any cloud services and if you don't have a powerful GPU, you can use this amazing model on
-
00:02:46 a free Kaggle account for free. So, as usual, I have prepared an amazing post where you will find
-
00:02:52 all of the instructions, links and the zip file. Please read this post from top to the bottom.
-
00:03:00 You can download the latest zip file from the top or also from the very bottom where
-
00:03:05 the attachments are. So, what we need to be able to use the SANA on our Windows Computer,
-
00:03:12 we need to have Python 3.10 installed, Cuda 12.4, cuDNN, C++ tools and Git. How to install them
-
00:03:22 has been explained in this amazing tutorial video step by step, so please follow that. This is only
-
00:03:29 one time mandatory, after that you will be able to use all of the AI applications perfectly fine. So,
-
00:03:36 let's go to the bottom and download the zip file. As I said, please read the announcements, changes,
-
00:03:42 updates, everything on this post before you begin installation and usage. How to install on RunPod,
-
00:03:49 on Massed Compute and Kaggle will be shown after Windows tutorial part has been completed,
-
00:03:55 but it is mandatory to watch the Windows tutorial part to learn how to use this amazing application.
-
00:04:02 If you are a Linux user, you can use RunPod or Massed Compute installers to install on
-
00:04:07 your system because RunPod and Massed Compute are both Ubuntu Linux. Move the zip file into the disc
-
00:04:14 drive where you are going to install, I'm going to install into my Seagate. Extract the files,
-
00:04:19 extract. Then make sure that your folder does not have any special characters or space character and
-
00:04:26 use a short path like this. All you need to do is just double click windows install.bat file.
-
00:04:34 It will start the installation automatically for you, it will install everything into a virtual
-
00:04:39 environment with using Python 3.10 and it will automatically download the necessary SANA models
-
00:04:46 to the accurate folders for you. During the installation, you will also see this error,
-
00:04:51 it is not important because we are fixing that in the next part. Unfortunately, there is not
-
00:04:57 an officially supported Triton for Windows but we are using a pre-compiled wheel. Moreover, you
-
00:05:04 will see that my downloader has been optimized for speed, it will use your entire speed, currently,
-
00:05:11 you see this is downloading with 100 megabytes per second on my Computer even more than that.
-
00:05:17 However, if you get an error, however, if you get an error during the download for any reason,
-
00:05:23 we have Windows fix model download.bat file, you can run this afterwards if you get an error
-
00:05:30 during this stage. So, the installation has been completed, quickly verify whether there are any
-
00:05:36 errors or not. Moreover, you should save the logs if there is an error. How to, you see in the top
-
00:05:43 here, right click, export text, save it anywhere and send me installation logs. On Windows 10,
-
00:05:50 you need to select everything like this, ctrl-C, copy, paste anywhere and send me logs. Then click
-
00:05:57 anywhere to close. Now we are ready to start using the SANA model from the NVIDIA. How to start,
-
00:06:04 you see there is Windows start.bat file, double click it, more info run anyway and
-
00:06:09 it is started. Do not run any of the bat files as an administrator unless it is explicitly stated.
-
00:06:17 All of my scripts runs as normal user. So, this is the interface. How to use this interface, first of
-
00:06:23 all, decide which model you are going to use. SANA 2K model is 4 megapixel model and may not work on
-
00:06:31 low VRAM GPUs even though I have made an amazing optimization to the pipeline of the SANA model.
-
00:06:39 With my optimization, I am offloading VAE and the model at the final stage of the image generation,
-
00:06:46 otherwise it was very slow and it was using a lot of VRAM. So first decide which model you are going
-
00:06:51 to use. Let's use the SANA 2K model, 4 megapixel, when you change model, wait until model reloading
-
00:06:59 has been completed, you see currently it is reloading the model. Model has been reloaded.
-
00:07:04 Type your prompt like super fast, amazing car moving on the ice on a sunny day, then here the
-
00:07:12 resolution. SANA works slightly different than other models, it is based on the aspect ratio,
-
00:07:19 it is always going to generate same resolution. So, when you change resolution to 1536 to 1536,
-
00:07:27 it is still going to generate in 2048 to 2048 because this is SANA 2K model. Therefore,
-
00:07:36 I recommend you to set the aspect ratio from this dropdown box that I have added for you, let's try
-
00:07:43 4:3, so you see it is going to automatically set accurate resolution for you like this. Then
-
00:07:48 there are sampling steps, I didn't notice much improvement with more steps but you can do any
-
00:07:54 number of steps you want. CFG guidance scale is going to impact how much it is going to follow
-
00:08:01 your prompt, this is default value. PAG guidance scale is again related to the SANA model itself,
-
00:08:08 you can try different values and see their impact. You can also use negative prompt if you wish. But
-
00:08:15 it is probably not necessary, moreover, we have image styles that you can immediately apply.
-
00:08:22 And by default, it is going to randomize seed, so with different seed, you are going to get a
-
00:08:28 different image every time you generate an image even though the prompt is same. Finally, we are
-
00:08:34 supporting only one sampler at the moment. You can also increase batch size, this is going to speed
-
00:08:40 up your generation, it is working and you can generate any number of images as you wish. Okay,
-
00:08:47 let's click run and let's begin generation. You can always follow the status on the CMD window
-
00:08:54 which I recommend because always there will be more information on the CMD window. You see my
-
00:09:02 extreme optimization is working amazing, otherwise it would be using a lot of VRAM. And even though
-
00:09:08 we are generating huge resolution, the speed is great as you are seeing right now. So, it
-
00:09:12 is moving models back and forth and the image has been generated. Let's change aspect ratio to 16:9
-
00:09:20 and generate. The first generation can be slower than the consequent ones. So, it is 1.38 IT per
-
00:09:27 second on RTX 3090 TI right now on the 4 megapixel resolution model. This is a huge resolution. And
-
00:09:35 we got the image. So, where are these images are saved, click open outputs folder. It will
-
00:09:41 open the folder, they will be saved like this, you see online demo image and there will be the
-
00:09:48 date of the folder. Let's open one of the images, so you see this is an original native 4 megapixel
-
00:09:55 resolution image. I made this application very, very advanced, it supports multi line prompt. So,
-
00:10:01 I can type here another thing. Let's try car, truck, apple. And let's try 3D model style and
-
00:10:09 let's generate. So, it is going to generate each one of the prompts one by one, this also supports
-
00:10:15 batch size and number of generations. With this way, you can type your prompts each line and it
-
00:10:22 will generate that line with an order. You can follow the status on here. So, you see after the
-
00:10:28 first image, it says generated one over three images, this is showing everything for you. So,
-
00:10:34 this is the first image, we just prompt car, this is an extremely simple prompt. You can see example
-
00:10:41 prompts at the bottom and try them and understand how they are working. These prompts are from the
-
00:10:47 official repository of the SANA model from the NVIDIA. And as these prompts are generated,
-
00:10:54 you will see this interface is getting updated, this is also a very cool feature that I have
-
00:11:00 developed. You see like this to like this. Yeah, I cannot say this is a great image but our prompt is
-
00:11:05 also very simple, that is why. But we can clearly see that it is following the 3D prompt. You can
-
00:11:12 also click this download icon to download it, also click here to see it as a full screen like this.
-
00:11:18 My application is using the latest version of the Gradio, so it is fully up to date. And the third
-
00:11:24 image is arriving. Yes, this is just an apple in 3D. We can also try anime, let's try. By the way,
-
00:11:32 I am doing 40 steps, this is not mandatory, you can also try 18 steps which is default.
-
00:11:38 Sometimes it may not display image in here after it has been generated, in that case, go to the
-
00:11:43 outputs folder and the image will be saved there, so you can see. So, this was the anime car image,
-
00:11:50 it is looking pretty, pretty good, it is just car prompt with the style of anime. And this
-
00:11:57 is native 4 megapixel, I can see the resolution 2,688 to 1,536. And the truck. Yes, the anime
-
00:12:08 truck is even better than that as you are seeing right now. If you want to edit these styles, it
-
00:12:14 is also possible. Go to the SANA model where you have installed, go to the app folder. And when you
-
00:12:20 edit this SECourses app file, you will see these styles. And all images have been generated. So,
-
00:12:25 this is the anime version of the Apple. It is just looking amazing. This model is an improvement and
-
00:12:31 they are publishing new models, so this model is promising, hopefully I will also make tutorials
-
00:12:37 for training SANA model. Now I will show you how to use this amazing model on the Massed Compute,
-
00:12:44 so if you don't have a powerful GPU, you can also use it on the Massed Compute, then RunPod,
-
00:12:50 then on a free Kaggle account. Unfortunately, on the free Kaggle account, the SANA 2K model is not
-
00:12:55 working but SANA 1K model is working perfectly fine. Now I will show you how to use the SANA on
-
00:13:01 Massed Compute on a cloud service, if you don't have a powerful GPU, this is the way of using it
-
00:13:08 fast or if you want to do more scaling, generating faster, again, cloud is your choice. So, when you
-
00:13:15 scroll down, you will see our cloud section and in here, I recommend using Massed Compute, after
-
00:13:22 Massed Compute, I will show RunPod and Kaggle as well. If you haven't downloaded the zip file yet,
-
00:13:28 go to the very bottom and download zip file from the attachments. Then please use this registration
-
00:13:34 link if you haven't registered yet to the Massed Compute, I appreciate that. After registering,
-
00:13:40 go to billing, set up your credits and load some balance then. Go to the deploy and in here,
-
00:13:46 you will see the available GPUs, so which GPU I recommend. I recommend L40 if it is available,
-
00:13:54 however, since our coupon is now working on L40, you see it is not available at the moment. So,
-
00:13:59 I will go with the second best GPU RTX A6000. You don't need multiple GPUs but if you want
-
00:14:05 to generate with multiple GPUs, you can also select them. To generate on multiple GPUs,
-
00:14:09 you need to start multiple instances of the application on each GPU with export Cuda visible
-
00:14:15 devices. It is so easy. So, from the category select creator and from image select SECourses.
-
00:14:22 Then you see the price is 62 cents per hour. Then we are going to apply our coupon SECourses verify.
-
00:14:29 And now it is 31 cents per hour, deploy. Wait a while, it will move you to the GPU's page,
-
00:14:35 yes. In here, we need to wait until initialization has been completed, moreover,
-
00:14:40 if this is your first time using Massed Compute, you should install ThinLinc client. The link of
-
00:14:46 ThinLinc client is here. Click here then download according to your platform, it works on Windows,
-
00:14:52 Mac, Linux, I'm on Windows, so click here. Click the downloaded exe file. Click yes, click next. I
-
00:15:00 accept, next, install. So, everything is default, finish. Then on this screen, click options, go to
-
00:15:07 the local devices, uncheck all and check drives. We are going to add a synchronization folder,
-
00:15:12 this is for transferring small files. Like generated images or the downloaded scripts,
-
00:15:19 so from here, remove everything. And click add, first of all, generate a folder on your disc
-
00:15:24 where you want synchronization to be happen. Go to the any disk you want and generate a folder,
-
00:15:30 then copy it's path like this. You see here, I click here and copy with ctrl-C and paste it here.
-
00:15:36 You see now it is added. Select the permission as read and write, so it can work both ways,
-
00:15:42 click okay, click okay. Now our ThinLinc client is ready to connect Massed Compute and use it. All
-
00:15:48 we need to do is just wait initialization. Okay, so the Massed Compute has been initialized, you
-
00:15:54 see status is running. Now we need to connect it. So, copy this, paste it. Copy this, paste it here
-
00:16:01 and make sure that username Ubuntu is also copy pasted here. If you click end existing session,
-
00:16:08 it is going to close all of the running applications on your Massed Compute on the cloud
-
00:16:14 service. Do not use this option unless you needed it, unless you are not able to connect to the
-
00:16:20 remote machine or the synchronization folder is not working, then click connect. Click continue.
-
00:16:26 Wait until this screen appears, then click start. And now this is the interface of the cloud Massed
-
00:16:33 Compute machine. So, this is running on the cloud, not on my Computer, I can do whatever I want here.
-
00:16:40 First of all, we should move the downloaded zip file into our synchronization folder. So,
-
00:16:47 the synchronization folder depends on wherever you have made it, it is inside here in my Computer.
-
00:16:53 Then click home here at the left top, go to the thindrives here and enter inside the folder. This
-
00:17:01 folder will be synchronized from your Computer, these will not work for big files. Remember,
-
00:17:07 for big files, use like Google Drive, OneDrive or Hugging Face, however, for small files, it
-
00:17:12 will work. Do not install anything here. First of all, you should copy the files into the downloads
-
00:17:18 or the other folders, so let's refresh this page to see the zip file. If you don't see it,
-
00:17:24 refresh it and here SANA zip file. So, I will drag and drop it into the downloads folder,
-
00:17:30 wait until it is copied here. Yes, it's copied already. Right click, extract here. Then enter
-
00:17:37 inside that folder and then open Massed Compute instructions txt file. Copy this installation
-
00:17:45 command with ctrl-C. Go back to the files here, click this three dots icon, open in terminal.
-
00:17:51 You see this terminal has been started inside that folder, you need to be inside this folder.
-
00:17:58 Then right click and paste. Then hit enter, it will install everything automatically for us on
-
00:18:05 Massed Compute. The Massed Compute installations are extremely fast. The initialization may take
-
00:18:11 a while but after that, once the machine has been initialized, the installations are like 10 times,
-
00:18:19 five times faster than RunPod. That is why I recommend the Massed Compute. You will see the
-
00:18:24 download speeds are just amazing, installation speeds are just amazing, it will be installed
-
00:18:29 under two minutes at max this model because this is not a very big model. So, after initialized,
-
00:18:36 it will be ready in like two minutes to use. So you see it is downloading with 1 GB per second,
-
00:18:43 sometimes, sometimes 500 megabytes per second, the average was around 600 megabytes per second. This
-
00:18:51 is the speed of the Massed Compute, there is no such speed anywhere, wow, this was downloaded with
-
00:18:57 600 megabytes per second. So, the installation has been completed already, you can quickly verify
-
00:19:03 whether there are any errors or not. But it is not mandatory, then return back to the Massed Compute
-
00:19:09 instructions txt file. Copy this part, you see, ctrl-C, return back to the folder where you have
-
00:19:16 extracted and installed. Click this three dots icon, open in terminal, right click and paste,
-
00:19:22 then it will start the application with a Gradio live link. You can also use it locally inside
-
00:19:27 ThinLinc client, however, I don't recommend it because it is slower. The Gradio will be faster,
-
00:19:33 okay, Gradio started, copy this link. You can access this link from your Computer, from your
-
00:19:40 phone, from tablet, wherever you want, even from your TV, then select the model which you want to
-
00:19:46 generate images. Let's select SANA 2K model, wait for processing to be completed. This will take
-
00:19:53 a while when do you first time load the model. Then we will be able to generate images. Okay,
-
00:19:59 so the model has been loaded. Now we are ready to start generating images, it is exactly same
-
00:20:04 as on the Windows tutorial part. Let's generate a car image as an anime, hit run. If you want to
-
00:20:10 see the status of the CMD window, go back to the ThinLinc client and you will see the generation,
-
00:20:16 it is pretty, pretty fast. 1.78 IT per second, faster than my RTX 3090 and this is only 31
-
00:20:25 cents per hour on Massed Compute. And the image has been generated. So when we click this here. So you will see the image here. You can
-
00:20:32 click this icon to download it onto your Computer or what you can do, you can go back to TinLinc
-
00:20:39 client, click open outputs folder, inside here, it should open the folder, if it doesn't open the
-
00:20:45 folder I will fix this later. Maybe since this is running on. Yes, this is running on Gradio live,
-
00:20:50 so it won't open it. So go to the SANA folder, go to the output, online demo images,
-
00:20:56 and this is where the generated images are saved. So, you can right-click, copy,
-
00:21:02 and go to the home, go to the thindrives, enter inside your synchronization folder, and paste it
-
00:21:08 there. If you have too many images, it may take a while for synchronization, but it should be fast
-
00:21:13 if you don't have many. Then, when I go back to my synchronization folder on my computer, I will
-
00:21:19 see that it will appear here. Yes, you see. When I enter inside the folder, I will see the image. So,
-
00:21:25 there is no stop and continue feature on the Massed Compute. If you want to stop using your
-
00:21:32 credits, you have to terminate the instance. But once you terminate the instance, everything will
-
00:21:38 be gone forever. So, if you stop the instance, it will not stop using your credits. You see,
-
00:21:44 it is also saying that this does not stop billing. There is no permanent storage on Massed Compute
-
00:21:49 yet. Hopefully, it will arrive soon. So, if you need permanent storage, you need to use RunPod,
-
00:21:54 which I am going to show after this part of the tutorial. So, let's terminate this instance,
-
00:21:59 then it will not be using our credits anymore. Now, I will show how to use NVIDIA Labs SANA
-
00:22:06 model on RunPod. If you don't have a powerful GPU, or if you want to scale up for any reason, you can
-
00:22:12 use RunPod to generate images. My recommendation is Massed Compute, but if you want RunPod, then
-
00:22:20 here it is. First of all, please register with this link. I appreciate that. Then, let's log in
-
00:22:26 after registration. Then, go to the billing, set up your billing, set some balance, then go to the
-
00:22:32 pods. Then, click deploy. Before deploying, make sure that you have downloaded the ZIP file from
-
00:22:39 the attachments and extracted it anywhere. Why? Because you need to read the RunPod instructions
-
00:22:47 TXT file. When you open that file, it will show you which RunPod template to use. So, this is the
-
00:22:54 template that we need. This is important. Pick any GPU you want. I am going to use RTX 4090. It
-
00:23:00 is a very fast GPU, and I am going to use secure cloud because I need faster initialization right
-
00:23:06 now. You can pick the server from here. I find that this is working a little bit faster. And
-
00:23:11 then RTX 4090. Then, click change template, type torch, and find the RunPod PyTorch 2.2.0. This is
-
00:23:21 the recommended version right now that you need. Click edit template, set the disk like 50 GB,
-
00:23:28 and set override. Then, click deploy on demand. Then, go to my pods. My pods are also here,
-
00:23:35 and wait for initialization to be completed. Since this is an official, very lightweight template,
-
00:23:42 it will be very, very fast. If it is not very fast, then the pod is likely to be broken. Okay,
-
00:23:48 it was really fast. Then, click connect and connect the Jupyter lab. If this is orange or
-
00:23:53 not enabled, refresh the page and try again. If this page doesn't load, refresh and try again,
-
00:23:59 and you can also sometimes restart your browser. Then, click this arrow, go to your downloads,
-
00:24:04 and upload the downloaded ZIP file like this. Then, right-click and extract archive. Then,
-
00:24:11 click this refresh icon. Wait for extraction. Then, double-click, open RunPod instructions.
-
00:24:16 The installation command is here. Just copy it with Ctrl+C, open a new terminal,
-
00:24:22 and you can do Ctrl+V, or right-click and paste. Both of them are working, and it will install
-
00:24:29 everything automatically for you. Just wait for the installation to be completed. So, the
-
00:24:33 installation on RunPod has been completed. Quickly scroll up and see if there are any errors or not.
-
00:24:39 The models have been downloaded, everything is ready. Return back to the RunPod instructions
-
00:24:44 TXT file, copy all of these, this is for starting, open a new terminal, then paste it, and hit Enter.
-
00:24:52 It is going to start the SANA app on RunPod with a Gradio live share link. You can also use RunPod
-
00:25:00 proxy to connect. However, we didn't add the proxy port during the initialization, therefore
-
00:25:06 we cannot use it right now. And I also recommend using the Gradio live share because it is working
-
00:25:12 way better than the RunPod proxy system itself. So, it is getting started. So, the Gradio live share
-
00:25:18 arrived, click it. This will be running on RunPod, not on your computer, and it will be really,
-
00:25:23 really fast. You can also access this from your tablet, from your phone, from your TV,
-
00:25:28 wherever you want. Then, use the model that you want exactly same as in the Windows tutorial part.
-
00:25:35 Let's generate an image with the 2K model and see the speed. The initial loading of the RunPod
-
00:25:41 will be way slower than the Massed Compute or Windows. RunPod hard drives are usually very slow.
-
00:25:48 The download speeds are really good right now because I have optimized these applications for
-
00:25:52 faster downloads. You see, it is using the entire download speed. If I didn't make these changes,
-
00:25:59 it would be limited to like 40 MB per second. But now it is even able to get 300 MB per second. So,
-
00:26:06 the downloads of the shards have been completed. Now, we need to wait for models to be loaded. This
-
00:26:12 is the slowest part on RunPod usually. You need to wait until this processing is gone. The model
-
00:26:19 has been switched. So, the model has been loaded. Let's type an example prompt like car, and let's
-
00:26:26 generate with anime. As I said, please watch the Windows tutorial part to learn how to use this
-
00:26:31 application. The speed is just mind-blowingly fast. We can see. It is 2.5 IT per second,
-
00:26:37 2.6 IT per second. It will take a few seconds. Yes, the image has been generated. You can click
-
00:26:44 here to download, and it should download, yes. Or, you can go to the SANA folder here, output folder,
-
00:26:51 online demo image, and this is where they are saved. Right-click and download as an archive. It
-
00:26:57 will download all of the generated images for you. The usage, the rest is same as on the Windows,
-
00:27:03 so watch that part. If you don't want your credits to be spent, you need to stop the pod. However,
-
00:27:09 stopping the pod will still not stop using your credits. You need to terminate the pod. Once you
-
00:27:15 terminate the pod, you won't be able to recover any of the files again. You can also start this
-
00:27:21 pod again and start using it immediately again. For reusing it, you just need to run this command
-
00:27:27 as usual. Okay, let's terminate this pod so we won't be spending any money, and it is
-
00:27:32 terminated. Now, I will show how you can use the SANA model on a free Kaggle account. This is the
-
00:27:38 least recommended way, but it is free. So, if you don't want to pay any money to any cloud service,
-
00:27:45 if you don't have a powerful GPU, you can use Kaggle free GPUs 30 hours every week. Yes,
-
00:27:53 every week. So, how to use Kaggle? First of all, download the attached ZIP file. Inside there,
-
00:27:59 there will be a Kaggle notebook. Extract it. Go to the kaggle.com, generate your account,
-
00:28:04 it is free. After generating your account, make sure that you have verified your phone number from
-
00:28:10 settings, otherwise, it will not work. Then, click create a new notebook. Then, click file
-
00:28:15 and import the notebook, browse files, go to the folder where you have extracted the ZIP file, and
-
00:28:22 you see Kaggle free account notebook version 3. Double-click it and select, then you see selected,
-
00:28:28 and click import. Then, wait until you see this, then click okay. Now, what you need to do is,
-
00:28:34 first of all, you need to select the session options. You see, accelerator is selected as GPU
-
00:28:41 T4x2. This is important. Then, make sure that the internet is on. If you are not able to select the
-
00:28:46 GPU, that means that your account is not phone verified. Once you have both of them selected,
-
00:28:53 click the start session, wait until this becomes green. It should be pretty fast. Okay, you see
-
00:29:01 it is becoming green, and when you click here, you should see the GPU and everything. Yes, now we are
-
00:29:06 ready. Then, click this cell. You can either click this play icon here, or if it is not visible,
-
00:29:13 you can click the run current cell here. Click it. The first cell is going to install everything
-
00:29:19 automatically for us. Just wait until this cancel run disappears. Once it is disappeared,
-
00:29:26 it means that the installation has been completed. You can also follow the what is happening in the
-
00:29:33 output. You will see the outputs like this. Just wait until cancel run disappears, and the
-
00:29:39 cell execution has been completed. So, the Kaggle installation has been completed. We need to get a
-
00:29:46 token from here. Click here, this link, register an account on the Ngrok, it is free. Copy your
-
00:29:52 token, then paste it here, then execute this cell. Then, you will get a link here. Open this link,
-
00:30:00 but do not click visit site yet. Then, click this cell, and it will start the application.
-
00:30:07 We need to wait until the application is started, then we will click this visit site. So, wait here
-
00:30:15 for the application to start. You will see it is running on local URL. Once you see that, that
-
00:30:21 means the application has been started. Let's just wait a little bit. Yes, now running on local URL,
-
00:30:28 that means the application has been started. Click visit site. Now, we will be able to use
-
00:30:33 the SANA model on a free Kaggle account. So, put your prompt, select your aspect ratio exactly as
-
00:30:40 in the Windows tutorial part, then run, and it will start generating images. The same is
-
00:30:45 exactly as on the Windows tutorial part. SANA 2K model is not working on Kaggle yet because of the
-
00:30:51 GPU limitations. And what if you want to download generated images all at once? There is a cell here
-
00:30:59 to run this cell, you need to cancel run. It will generate images in the Kaggle working directory.
-
00:31:04 I will show after the first image has been generated. Moreover, you can also download from
-
00:31:10 the Gradio interface as well. The first generation may be slower because it will download necessary
-
00:31:16 files, load them, but the consequent ones will be faster. So, the image on the Kaggle notebook has
-
00:31:23 been generated. You see, it is here. I can click here to download the image. It is downloaded. Or,
-
00:31:29 I can use this mass download. To download it, let's cancel run and click this cell, and it
-
00:31:35 will generate images inside the Kaggle working directory. Let's refresh it. Yes, so you see
-
00:31:41 images.zip file. Click these three dots icon and download, and it will download the images. If you
-
00:31:47 want to restart the application after this, let's right-click and clear output of all cells. Then,
-
00:31:54 you need to get a new link from here. So, execute this cell, get a new link, open it, but don't
-
00:32:01 click visit site yet. Start the application, and once we see the local URL, it is same as the first
-
00:32:07 time we will be able to start using it. Moreover, how much time you left will be displayed here.
-
00:32:14 You see, currently, I have 30 hours this week to use. I can generate images 30 hours on the Kaggle
-
00:32:22 for free, and it is ready now, and visit site. Kaggle is extremely picky, so if you generate
-
00:32:29 anything not safe for work, they will block your account. So, use the Kaggle with respect
-
00:32:36 to the its rules. And then, stop your session. If you close your computer, Kaggle will not work,
-
00:32:42 but if you are using RunPod or Massed Compute, you can close your computer, and they will continue
-
00:32:48 generating images at the server, and it is ready again. Let's stop the session. Thank you so much
-
00:32:54 for watching. We have Patreon exclusive post index here. We have Discord server here. So, if you join
-
00:33:01 our Discord server, you can chat with me. You can chat with other 10,000 people. I also have
-
00:33:08 a Stable Diffusion Generative AI GitHub. Please fork this, watch this, star it. If you sponsor,
-
00:33:14 I appreciate that. When you scroll down, you will see we have tutorial videos list. It is very long.
-
00:33:20 You can watch all the videos here. And we have a Reddit. So, go to this Reddit link and also
-
00:33:25 follow us on the Reddit as well. And you can also follow me on my LinkedIn profile. It is
-
00:33:31 my real profile. Thank you so much for watching. Hopefully, see you in future amazing tutorials.
