How to run ComfyUI with a rented GPU

By Heiko HeiligApril 17, 2025
cloudriftgpu-rentalopensource-aitutorialcomfy-ui

A no-nonsense guide to renting powerful GPUs, launching ComfyUI, and actually enjoying the ride.

AI Generated image of a realistic looking minotaur in a medieval setting wearing heavy armor

When you first dip your toes into the world of AI tools, everything feels like a smooth ride. You type a prompt into ChatGPT, and there you go — instant results. You show it around — applause. You click around in Midjourney or Runway, and bam — pretty images, stuff is moving, no assembly required.

But eventually, you hit a point where you want to go a little deeper.

You don’t just want to use AI — you want to build with it. Control it. Understand (at least to a degree) how the magic happens. For me, this thought led me down the rabbit hole of CivitAI and Hugging Face (see my last article here) and I also discovered tools like ComfyUI.

So You’re Curious About Open Source AI (and a Little Intimidated)?

What Is ComfyUI?

ComfyUI is a free, open-source tool for generating images and videos with AI — built around a modular, node-based interface. Instead of just typing a prompt and hoping the AI gets it right, you design your own image generation workflows step by step.

A screenshot of the Comfy UI web interface displaying several nodes and connections.
ComfyUI is an image generation tool, that’s free to use. Its node-based UI is not nearly as hard to get into as you might think.

Each block (or “node”) in ComfyUI represents a part of the process — loading a model, interpreting a prompt, tweaking parameters, generating the image — and you can connect and customize them however you like.

What makes ComfyUI stand out:

  • It’s free and open-source, meaning anyone can use, extend, or modify it, no subscription needed.
  • It gives you much more control over the generation process.
  • It’s powered by Stable Diffusion, but it doesn’t lock you into one way of working.

If you’ve ever wanted to peek under the hood of AI image generation and actually build your own system — ComfyUI lets you do that, without needing to pay for some closed, black-box platform.

The node-based interface might seem a bit daunting at first, but you’ll realize quickly, that ComfyUI is a modular, visual sandbox that gives you actual control over what you create — And that’s where things get exciting.

How to Get Started with ComfyUI

Technically, there’s nothing stopping you from downloading ComfyUI to your computer and running it from there — but get ready to wait. A lot. AI Models like ComfyUI use a lot of your graphics card’s capacity, and if you’re not running a super-high-end gaming setup, things will be slow.

Especially when you’re still figuring out what all the settings do, waiting several minutes just to get an image full of artifacts is… less than ideal. That’s why we will be renting out some GPUs to do the heavy lifting for us. Don’t worry, it’s surprisingly simple and involves no commitment.

a screenshot of a failed output by a ai image tool with wrongly rendered colors and plenty of noise
When I first got started, this is what came out after 5 minutes of waiting. So better rent a decent GPU.

There are generally two ways to go about it:
One is the just-a-few-clicks-template-way — simple and fast, but with a little more jank.
The other is a manual CLI based setup — with all the power, and all the responsibility that comes with it.

Ready? Let’s go.

Setting Up ComfyUI Using a Template

This one’s pretty simple. We’ll just rent a GPU and get a link to open a pre-installed version of ComfyUI right after. You can start using it immediately — no setup, no stress. And it really sounds like more commitment than it is. Our provider of choice here is NeuralRack.

NeuralRack is a GPU provider that lets you rent high-performance models like NVIDIA’s RTX 4090 and RTX 5090 for a decent hourly price. No long-term commitment — just pay as you go.

Screenshot of the interface of the GPU marketplace NeuralRack displaying different GPU models for rent
When you’re picking a GPU on NeuralRack, the selection might look different to you, depending on what’s available, but an RTX 4090 is always a good choice.

Here’s how to get started:

  1. Go to NeuralRack.ai and log in.
  2. Add credits (10 USD is more than enough to get started).
  3. Click “New” to start setting up your instance.
  4. Select Container Mode.
  5. Pick your GPU (if you’re not sure, start with the cheapest — even low-end ones handle basic workflows surprisingly well).
  6. Under the Select Software tab, choose Recommended.
  7. Look for the template called ComfyUI-FLUX.1-Schnell under Image Generation. Select it and confirm.
  8. Click “Deploy” and wait a minute while your instance spins up.
  9. In the dashboard, you’ll see a summary of your instance — click Connect, then open the link in the window that pops up. There, you’ll also find a lot of helpful resources on how to use ComfyUI.
A screenshot of the Comfy UI web interface displaying several nodes and connections.
The new browser window that pops up should look a little something like this.

Setting Up ComfyUI Using the CLI (aka the more complex way)

As mentioned before, using the template lets you get started right away. Through the Manager menu in ComfyUI, you can even install updates, additional tools, and plugins relatively easily.

But I found that by setting everything up manually, I got a much better picture of how it all works — and I could be more intentional and precise with my setup.

So, here’s the advanced version:

Let’s start with the basics: CLI = Command Line Interface. It’s a tool that lets you interact with services (like your rented GPU) using text commands instead of clicking buttons. If you’re on a Mac, just open Terminal. On Windows, it’s CMD or PowerShell.

In our case, we‘d have to install an additional tool before we get started: the CloudRift CLI — a lightweight command-line tool that connects to the cloud GPU you rented and lets you deploy applications (like ComfyUI) in just a few lines. Here’s how to install the CloudRift CLI.

Once that’s done, go to neuralrack.ai and let’s get our hands dirty.

Step 1: Rent a GPU via NeuralRack

a screenshot of the dashboard of a GPU Marketplace. It displays relevant data needed for the rest of the tutorial. such as ip addresses and workplace IDs
NeuralRack is a GPU provider that lets you rent out models like RTX 4090 and RTX 5090 for a pretty decent price.
  1. Go to NeuralRack.ai and log in.
  2. Add Credits
  3. Choose “New” to start setting up your instance.
  4. Select Container Mode.
  5. Pick your GPU
  6. In the “Select Software” tab, this time, select “No Container”. This gives us a clean slate.
  7. Click “Deploy” and wait a moment.
Screenshot displaying the rental process for GPUS. The chosen tab here is the “No Container” tab which contains a list of the most important commands we will be needing in this tutorial
Renting your GPU should be pretty straightforward. Under the software tab, choose “No container”.

Step 2: Launch ComfyUI with a Single Command

Now that you’ve got your GPU running somewhere in the cloud, let’s access it.

First, open your terminal and make sure you’ve installed the CloudRift CLI — otherwise, the rift command we’re about to use won’t work.

First, check if your GPUs are actually available by typing:

rift cluster info

and hit enter.

A screenshot of the result of our CLI command. It displays a table containing our identifier, available RAM, the GPUs we rented out and some other information pertaining to our workspace.
This is what your terminal will show you. Here I rented two RTX 4090. The machine they’re running on has its own name and ip address, as seen in the first and second column.

Here’s the command you’ll run in your terminal next:

rift docker -x <executor id> run -p 8188 -e WEB_ENABLE_AUTH=false --name comfyui -it --rm ghcr.io/ai-dock/comfyui:latest-cuda

Let’s break it down:

  • rift docker: You’re running Docker on your cloud GPU.
  • -x <executor-id>: Optional as long as you only have one instance running — Replace this with the name from rift cluster info (e.g. my-gpu-01).
  • -p 8188: Opens port 8188 so you can access ComfyUI via browser.
  • -e WEB_ENABLE_AUTH=false: Disables the login screen for simplicity.
  • --name comfyui: Optional — makes your container easier to reference later.
  • -it: Runs the container in interactive mode.
  • --rm: Removes the container when you stop it, so it doesn't take up space.
  • ghcr.io/ai-dock/comfyui:latest-cuda: This is the Docker image for ComfyUI (basically the app we’re installing).

You’ll see some logs fly by — messages about pulling the image, connecting tunnels, etc. That’s normal. Give it a minute or two. Congrats, you just set up your first container and installed ComfyUI on it!

Quick Note: Keep It Running

If you close the terminal window now, your container stops running. Just keep it up and open a new terminal window to continue.

Step 3: Confirm It’s Up

In the new terminal window, use the following command:

rift docker ps

This will list all active containers. If ComfyUI is running, you’ll see something like:

screenshot of a summary of our instance in the CLI. It displays the name of the image we pulled, the identifier and some othe information.

Then, open your browser and go to:

http://{node-IP-address}:8188

Replace {node-IP-address} with the IP from rift cluster info (or check the IP listed in your NeuralRack rental details).

A screenshot of the Comfy UI web interface displaying several nodes and connections.
This is what you should be seeing about now.

Congrats! You’ve officially launched ComfyUI on a rented GPU. Now let’s make it do something.

Step 4: Download a “Checkpoint”

Before generating images, you need a checkpoint — a trained model that tells ComfyUI how to turn your prompts into images. Think of it like the “brain” of the operation. If ComfyUI is the body, the checkpoint is what actually knows what to draw.

We’ll use DreamShaper, a beginner-friendly model that works great out of the box. You can find other checkpoints on CivitAI.

Run the following to connect to your container:

rift docker exec -it comfyui bash

Now you’re inside the container — it’s like opening a terminal inside the rented machine.

Next, navigate to the correct folder:

cd /opt/ComfyUI/models/checkpoints/

And then run this to download DreamShaper V8:

wget https://civitai.com/api/download/models/128713 --content-disposition

(obviously, you can exchange this one for any other checkpoint’s download link)

This may take a minute or two depending on the model size and internet speed. You’ll see something like:

dreamshaper_8.safetensors 100%[====================>] 1.99G

When that’s done, exit the container with:

exit

Step 5: Start Generating!

Open your browser (if it’s not already), and go to:

http://{node-IP-address}:8188

You should see ComfyUI’s interface. Load the default text-to-image workflow if it’s not already there.

I went and updated ComfyUI through the manager menu, see here:

A screenshot of the Comfy UI web interface displaying the manager menu. From here, we can run updates and install other nodes and models.

After you’re done, make sure your DreamShaper V8 checkpoint is selected in the “Load Checkpoint” node.

A screenshot of the Comfy UI web interface displaying checkpoint selector as well as the prompt and negative-prompt nodes.

Then comes the magic. Click the top box that says “Prompt” and enter your prompt. The box below is the negative prompt, meaning what you put there, is what you don’t want to be in the image.

Click “Queue Prompt”, wait a few seconds, and there it is: Your first custom image using ComfyUI + a rented GPU. For an in depth-tutorial on ComfyUI, you can also check out this playlist by Scott Detweiler on YouTube.

I’m a fantasy and video game nerd, so naturally, when presented with the opportunity to create crazy AI generated artwork, my mind goes to something like what you see below. But of course, you can go and put together whatever you fancy (no judgement). You could also try and load different checkpoints from sources like CivitAI. In this case, when you use this command, like you did earlier:

wget https://civitai.com/api/download/models/128713 — content-disposition

you just replace the link with the download link of whatever model you found.

AI Generated image of a demonic looking man with glowing red eyes and horns looking into the camera
AI Generated image of a realistic looking minotaur in a medieval setting wearing heavy armor

When you’re done, don’t forget: Shut it down

And one more thing: When you’re done, go to your NeuralRack dashboard and stop the instance there to avoid charges.

TL;DR:

  • ComfyUI is a free node-based AI image generation tool you can run in the cloud using CloudRift CLI.
  • Renting a GPU via NeuralRack.ai gives you the power without the heat (or hardware costs) and significantly increases the speed with which content is created.
  • You can start from scratch using a single command, download a model from CivitAI, and generate your first image in minutes.
  • The process is surprisingly approachable — even if the terminal looks scary at first.

Thats all for today. Stay curious, stay scrappy, and don’t be afraid to type weird things into a black box.
That’s where the good stuff happens.


How to run ComfyUI with a rented GPU was originally published in Bootcamp on Medium, where people are continuing the conversation by highlighting and responding to this story.