Skip to content

Cloud GPU

Acly edited this page Mar 31, 2024 · 3 revisions

Guide: Rent a Cloud GPU

This is a step-by-step guide on how to run the Stable Diffusion server remotely on cloud services like runpod.io, vast.ai or sailflow.ai. This allows you to use the plugin without installing a server on your local machine, and is a great option if you don't own a powerful GPU. There is no subscription, you typically pay between 0.25$ to 0.50$ per hour.

runpod.io

runpod.io is fairly stream-lined, but offers limited information about download speeds, and is a bit more pricey.

Step 1: Sign up and add funds

Go to runpod.io and create an account. Go to "Billing" and add funds (one-time payment, minimum 10$, card required).

Step 2: Select a GPU

I choose community cloud and select 1x RTX 3080. It's cheap and fast! Click Deploy.

runpod-1

You are free to choose one of the other options of course.

Step 3: Select the template

Runpod supports all kinds of workloads. To run a server for the Krita plugin, select "Stable Diffusion ComfyUI for Krita". Just typing "krita" into the search bar should find it, or use this link. Click Continue.

runpod-2

Step 4: Deploy!

You will get a cost summary. Click Deploy.

Now you have to wait until the server is up. This can take a while (~10 minutes) depending on the download speed of your pod. Eventually it should look like this:

runpod-3

Step 5: Connect

Once your pod is running, click Connect and choose "HTTP Service [Port 3001]".

runpod-4

This should open ComfyUI running in your browser. Now simply copy the URL into the Krita plugin and connect!

runpod-5

runpod-6

Afterwards

After you're done using the pod, remember to stop it. You can keep it inactive to potentially reuse it later, but it's not free. To avoid charges, make sure to discard/delete the pod.

vast.ai

vast.ai has a very similar offering. You get more details about the machine you will run on, but it also requires you to filter the available pods to get what you want. Minimum initial funds is 5$.

The UI is very similar to runpod.io and so are the steps to set it up.

Template

You can use this template. Try to select a pod in your region with good internet connection. Click Rent.

vast-1

Connecting

Once your instance has finished loading and is running, click the button which displays the port range to find the URL to connect.

vast-2

The URL will be the one which maps to port 3001. Copy it into Krita and connect. Make sure it doesn't contain any spaces!

vast-3

vast-4

sailflow.ai

sailflow.ai is a GPU cloud platform, which allows you to start krita-ai-diffusion faster. You don't have to install ComfyUI in the cloud GPU server in advance, you just follow the instruction below, create a job, connect to the web address and then done.

Step 1: Sign up

Go to sailflow.ai and create an account, try referral code: R5QXRVE6.

截圖 2024-03-29 上午11 26 31

Step 2: Select the template

You can select Krita template immediately at Home page. Feel free to start, being comfortable to top-up later or try subscription plans. Click Krita.

截圖 2024-03-29 上午10 53 32

You are free to choose one of the other options of course.

Step 3: Deploy!

You will get a cost summary. Click Submit.

截圖 2024-03-29 上午11 39 19

Now you have to wait until the server is up. This will be available soon (~1 minutes) depending on the download speed of your pod. Eventually it should look like this:

Step 4: Connect

Once your pod is running, you may notice that SD APP button has been enabled and you can connect to ComfyUI through this button.

截圖 2024-03-29 下午12 02 53

This should open ComfyUI running in your browser. Now simply copy the URL into the Krita plugin and connect!

截圖 2024-03-29 下午12 42 24

sailflowai-6

Afterwards

After you're done using the pod, remember to stop it. You can keep it inactive to potentially reuse it later, but it's not free. To avoid charges, make sure to discard/delete the pod.

Custom checkpoints and LoRA

If you want to use custom models you will have to download them to the pod. There is no UI for this yet, but it can be done via SSH terminal.

Either use the web terminal, or connect via ssh.

  • Download Checkpoints to /models/checkpoints
  • Download LoRA to /models/lora
cd /models/checkpoints
wget --content-disposition 'http://file-you-want-to-download'

After download is complete, click the refresh button in Krita and they should show up.

cloud-gpu-custom-checkpoint