How to Use SwarmUI & Stable Diffusion 3 on Cloud Services Kaggle (free), Massed Compute & RunPod

7 views
Skip to first unread message

Furkan Gözükara

unread,
Jul 1, 2024, 6:56:05 PM7/1/24
to SECourses
Tutorial Video : https://youtu.be/XFUZof6Skkw

glow (2).png


This video provides a comprehensive guide on installing and utilizing #SwarmUI on various cloud services. It's particularly valuable for those without access to a powerful GPU or seeking additional GPU power. The tutorial covers the implementation of SwarmUI, a leading Generative AI interface, on platforms such as Massed Compute, RunPod, and Kaggle (which offers complimentary dual T4 GPU access for 30 hours per week). The instructor demonstrates how to deploy SwarmUI on cloud GPU providers with the same ease and efficiency as on a local PC. Additionally, the video showcases the use of Stable Diffusion 3 (#SD3) in cloud environments. It's worth noting that SwarmUI employs a #ComfyUI backend.

🔗 Access the Public Post (no login or account required) Featured in the Video, Including Relevant Links ➡️ https://www.patreon.com/posts/stableswarmui-3-106135985

🔗 Windows Tutorial for SwarmUI Usage ➡️ https://youtu.be/HKX8_F1Er_w

🔗 Tutorial on Rapid Model Downloads for Massed Compute, RunPod, and Kaggle, plus Fast File Uploads to Hugging Face ➡️ https://youtu.be/X5WVZ0NMaTg


🔗 Join the SECourses Discord Community ➡️ https://discord.com/servers/software-engineering-courses-secourses-772774097734074388

🔗 Stable Diffusion GitHub Repository (Please Star, Fork, and Watch) ➡️ https://github.com/FurkanGozukara/Stable-Diffusion

Promotional Code for Massed Compute: SECourses
This code is applicable to Alt Config RTX A6000 and RTX A6000 GPUs

0:00 Introduction to the SwarmUI cloud services tutorial (Massed Compute, RunPod & Kaggle)
3:18 SwarmUI installation and usage guide for Massed Compute virtual Ubuntu machines
4:52 ThinLinc client synchronization folder setup for Massed Compute virtual machine access
6:34 Connecting to and initiating use of a Massed Compute virtual machine post-initialization
7:05 One-click SwarmUI update process on Massed Compute prior to usage
7:46 Configuring multiple GPUs on SwarmUI backend for simultaneous image generation with queue system
7:57 Monitoring GPU status using the nvitop command
8:43 Overview of pre-installed Stable Diffusion models on Massed Compute
9:53 Massed Compute's new model download speed demonstration
10:44 Identifying and addressing GPU backend setup errors in a 4-GPU configuration
11:42 Monitoring the status of all four active GPUs
12:22 Image generation and step speed analysis for SD3 on RTX A6000 (Massed Compute)
12:50 CivitAI API key setup for accessing gated models
13:55 Efficient bulk download of generated images from Massed Compute
15:22 Latest SwarmUI installation on RunPod with precise template selection
16:50 Port configuration for SwarmUI connection post-installation
17:50 Downloading and executing the installer sh file for SwarmUI on RunPod
19:47 Resolving the "backends loading forever" error through pod restart
20:22 Reinitiating SwarmUI on RunPod
21:14 Stable Diffusion 3 (SD3) download and usage guide for RunPod
22:01 Multiple GPU backend system setup on RunPod
23:22 RTX 4090 generation speed analysis (SD3 step speed)
24:04 Quick method for downloading all RunPod-generated images to your device
24:50 SwarmUI and Stable Diffusion 3 installation and usage on a free Kaggle account
28:39 Modifying the model root folder path in SwarmUI on Kaggle for temporary disk space utilization
29:21 Adding a second backend to leverage the additional T4 GPU on Kaggle
29:32 Cancelling and restarting SwarmUI runs on Kaggle
31:39 Generating images with Stable Diffusion 3 on Kaggle
33:06 Troubleshooting and resolving out-of-RAM errors on Kaggle
33:45 Disabling one backend to prevent RAM errors when using T5 XXL text encoder twice
34:04 Stable Diffusion 3 image generation speed assessment on Kaggle's T4 GPU
34:35 Bulk download process for Kaggle-generated images to your device

Introduction to SwarmUI and Cloud Computing Platforms
In this article, a comprehensive guide is provided on how to use SwarmUI, Stable Diffusion 3, and other Stable Diffusion models on various cloud computing platforms. The tutorial covers three main platforms: Massed Compute, RunPod, and Kaggle. Each platform offers unique advantages for running SwarmUI and generating images using different Stable Diffusion models.

1.1 Overview of Platforms

Massed Compute is introduced as the cheapest and most powerful cloud server provider. The process of setting up and using SwarmUI on Massed Compute is explained in detail, highlighting its pre-installation feature and the latest version availability.

RunPod is presented as another cloud service provider that offers access to high-performance GPUs. The tutorial demonstrates how to install and use SwarmUI on RunPod, providing step-by-step instructions for a smooth setup process.

Lastly, the article covers how to use SwarmUI on a free Kaggle account, showcasing the ability to utilize both of Kaggle's provided T4 GPUs simultaneously for generating images.

1.2 Importance of Prior Knowledge

Before diving into the cloud computing setups, the article emphasizes the importance of watching a 90-minute SwarmUI tutorial for Windows users. This comprehensive tutorial covers all aspects of using SwarmUI, including how to use various Stable Diffusion models such as Stable Diffusion 1.5, SDXL, and Stable Diffusion 3. The Windows tutorial is divided into 90 chapters, allowing users to focus on specific areas of interest.

Using SwarmUI on Massed Compute
Massed Compute is presented as an excellent option for users without powerful GPUs who want to use SwarmUI and Stable Diffusion 3 with impressive speeds. The setup process on Massed Compute is straightforward, thanks to its pre-installation feature.

2.1 Registration and Deployment

To begin using Massed Compute, follow these steps:

Use the specially given link for registration to register.
After registering, enter your billing information and load some balance.
Navigate to the "deploy" section.
Use the special coupon code provided for RTX A6000 Alt config and RTX A6000.
The tutorial explains the difference between the RTX A6000 and RTX A6000 Alt config, which mainly lies in the RAM amount. Users are advised to select the Alt config if the standard RTX A6000 is unavailable.

For this tutorial, four GPUs are used to generate four images in parallel, although only one GPU is required to run SwarmUI. The deployment process involves selecting the "creator" category and "SE courses" image. The tutorial also demonstrates how to apply the special coupon code "SECourses verify" to reduce the hourly rate from $2.5 to $1.25.

2.2 Accessing the Virtual Machine

To access the Massed Compute virtual machine, the tutorial guides users through the installation and setup of the ThinLinc client:

Download the ThinLinc client installer for your operating system.
Install the ThinLinc client, following the provided instructions for non-Windows users if necessary.
Configure the ThinLinc client by setting up a synchronization folder for file uploads and downloads.
Connect to the virtual machine using the provided IP address and login credentials.
2.3 Setting Up and Using SwarmUI

Once connected to the Massed Compute virtual machine, the tutorial walks through the process of setting up and using SwarmUI:

Update SwarmUI to the latest version using the provided updater button.
Navigate through the SwarmUI interface, exploring various features and settings.
Enable multiple GPUs by adding additional backends in the server configuration.
Generate images using different Stable Diffusion models, including Stable Diffusion 3.
The article provides detailed instructions on how to utilize all four GPUs simultaneously, significantly increasing image generation speed. It also covers how to monitor GPU usage and generation speeds using the built-in tools.

2.4 Downloading Generated Images

The tutorial explains multiple methods for downloading generated images from the Massed Compute virtual machine:

Using the synchronization folder set up in the ThinLinc client.
Utilizing the Hugging Face upload method (covered in a separate tutorial).
Directly downloading from the virtual machine's file system.
Using SwarmUI on RunPod
The second part of the tutorial focuses on how to set up and use SwarmUI on RunPod, another powerful cloud computing platform that offers access to high-performance GPUs.

3.1 Registration and Pod Deployment

To get started with RunPod, follow these steps:

Use the provided link to register for a RunPod account.
Set up billing and load credits into your account.
Navigate to the "Pods" section and click "Deploy Pod."
Select the Community Cloud option (or explore the permanent storage option covered in a separate tutorial).
Choose the "extreme speed" filter and select the desired GPU configuration (the tutorial uses 3x 4090 GPUs).
Select the "RunPod PyTorch 2.1 with CUDA 11.8" template for optimal compatibility.
The article emphasizes the importance of selecting the correct template and provides guidance on customizing the deployment settings, such as disk volume and port configuration.

3.2 Installing and Setting Up SwarmUI

Once the RunPod is deployed, the tutorial guides users through the installation and setup of SwarmUI:

Connect to the pod's JupyterLab interface.
Upload the provided installation script (install_linux.sh).
Execute the installation commands in the terminal.
Follow the web-based installer to customize SwarmUI settings and download desired models.
The article provides detailed instructions for each step, including how to handle potential issues and optimize the installation process.

3.3 Using SwarmUI on RunPod

After installation, the tutorial demonstrates how to use SwarmUI on RunPod:

Accessing the SwarmUI interface through the provided HTTP service port.
Navigating the SwarmUI interface and exploring available models.
Generating images using various Stable Diffusion models, including Stable Diffusion 3.
Monitoring performance and generation speeds.
The article also covers advanced topics such as adding multiple backends to utilize all available GPUs and optimizing generation settings for best results.

3.4 Downloading Generated Images

The tutorial explains several methods for downloading generated images from RunPod:

Using the JupyterLab interface to download files directly.
Utilizing the Hugging Face upload method (covered in a separate tutorial).
Using RunPodCTL for efficient file transfers.
Using SwarmUI on a Free Kaggle Account
If you want to use SwarmUI on a free Kaggle account, the last part of the tutorial fully covers this process, allowing users to leverage Kaggle's free GPU resources for image generation.

4.1 Setting Up the Kaggle Environment

To begin using SwarmUI on Kaggle, follow these steps:

Register for a free Kaggle account and verify your phone number.
Download the provided Kaggle notebook file.
Create a new notebook on Kaggle and import the downloaded file.
Select the GPU T4 x2 accelerator option to utilize both available GPUs.
The tutorial provides detailed instructions for each step, ensuring a smooth setup process.

4.2 Installing and Configuring SwarmUI

The article guides users through the installation and configuration of SwarmUI on Kaggle:

Execute the provided cells in the Kaggle notebook to download models and set up the environment.
Follow the web-based installer to customize SwarmUI settings.
Modify the model root directory to utilize Kaggle's temporary disk space.
Add multiple backends to leverage both available GPUs.
The tutorial emphasizes the importance of proper configuration to maximize performance within Kaggle's resource limitations.

4.3 Generating Images on Kaggle

Once SwarmUI is set up, the article demonstrates how to generate images using various Stable Diffusion models:

Accessing the SwarmUI interface through the provided link.
Selecting models and configuring generation settings.
Monitoring performance and generation speeds within Kaggle's environment.
Handling potential resource limitations and optimizing for Kaggle's free tier.
4.4 Downloading Generated Images from Kaggle

The tutorial explains how to download generated images from the Kaggle environment:

Using the provided cell in the Kaggle notebook to zip all generated images.
Downloading the zip file through Kaggle's interface.
Additional Features and Resources
The article concludes by highlighting additional features and resources available to SwarmUI users:

5.1 CivitAI Integration

The tutorial introduces the new CivitAI API key feature, which allows users to download gated CivitAI models directly through SwarmUI. Instructions for setting up and using this feature are provided for each platform.

5.2 Community Resources

Users are encouraged to join the SwarmUI Discord server, which boasts over 7,000 members and serves as a platform for asking questions and engaging with the community.

5.3 GitHub Repository

The article promotes the SwarmUI GitHub repository, encouraging users to star, fork, and watch the project for updates and contributions.

5.4 Additional Tutorials and Resources

References to other tutorials and resources are provided throughout the article, including:

A comprehensive Windows tutorial for SwarmUI.
A guide on downloading models quickly to RunPod and uploading to Hugging Face.
A tutorial on RunPod's permanent network storage system.
In conclusion, this extensive guide provides users with the knowledge and tools necessary to leverage SwarmUI and Stable Diffusion models across various cloud computing platforms. By following the detailed instructions and exploring the additional resources, users can harness the power of these advanced image generation tools, regardless of their local hardware limitations.

Reply all
Reply to author
Forward
0 new messages