Skip to main content
Apidly Cloud
Cookie policy

Analytics and ad cookies stay off unless you accept. Cookie policy

We would like to use Google Analytics and Microsoft Clarity to understand how the public pages are used, including page views and session recordings, and the Reddit Pixel to measure whether our ads on Reddit lead to visits and sign-ups. You choose here whether they are on. Rejecting changes nothing about how the site works.

How to run Stable Diffusion and FLUX on a cloud GPU

Generate images with Stable Diffusion, SDXL or FLUX on a rented GPU: pick the right image template, size the GPU, load your checkpoint and pay only while it runs.

Published November 26, 20267 min read

Stable Diffusion and FLUX are open image models: you type a prompt and the model draws a picture. They need a GPU with enough memory, and a rented one is often the quickest way to get it. There are no drivers to install, the server is ready in minutes and billing is by the second from prepaid credit. This guide helps you choose between the image templates in the catalogue, pick a GPU for the model you want, and load SDXL or FLUX checkpoints yourself.

What you need

  • An Apidly account with some credit. Create an account, add credit under Billing and you are ready. The minimum top-up is on the pricing page.
  • The name of the model you want to use, and its licence. Stable Diffusion 1.5, SDXL and FLUX are published under different licences; read the one on the model's page before you use pictures commercially.
  • No SSH key is required for the browser tools below. Add one if you want to copy files with scp later.

Step 1: Choose an image template

Three image templates are in the catalogue today. Each one installs its tool on the first start and opens it in your browser behind a password. The minimum GPU memory is what each template declares.

Template Best for Model included Minimum VRAM
ComfyUI Full control with a node graph; runs SD 1.5, SDXL, FLUX and more Stable Diffusion 1.5 as a starter 12 GB
Stable Diffusion WebUI Forge A classic form-style interface with tabs for text-to-image and image-to-image None, you add your own 12 GB
Fooocus The simplest start: type a prompt, press Generate Its main SDXL model, about 6 GB, downloaded on the first start 8 GB

If you are not sure, start with ComfyUI. It reaches a first picture with clicks only, and it is the template to use for FLUX. Fooocus is the easiest if you only want SDXL-style pictures from prompts. Forge suits people who already know the WebUI layout and bring their own checkpoints.

The full list, with what each template installs, is on the templates page.

Step 2: Pick a GPU for your model

The model decides how much GPU memory (VRAM) you need. As a rough guide:

  • Stable Diffusion 1.5 is small and runs on any GPU that meets the template minimum.
  • SDXL and similar models want more memory, especially at higher resolutions or with large batches.
  • FLUX models are larger still. The biggest current image models want 24 GB or more; smaller or reduced-precision (for example fp8) builds need less. Check the model's own page for its requirement.

Extra nodes such as upscalers, ControlNet and LoRAs add to that. How much VRAM do you need? explains how to estimate it.

In the console, open Deploy, sort by Price, low to high and use the GPU memory filter to hide cards that are too small. Cards with 24 GB, such as the RTX 4090 and RTX 3090, are a common choice for image work; 48 GB cards such as the RTX A6000 and RTX 6000 Ada leave room for the largest models. Each GPU page shows what is in stock and its current price. Prices follow supply and change, so check live pricing rather than a number in a guide.

At the time of writing these three image templates do not run on RTX 50-series, RTX PRO and other Blackwell GPUs. Deploy marks those configurations, so you cannot choose one by mistake.

Step 3: Start the server

The fastest way is Quick start: on the console Overview, select Quick start, choose Generate images, check the price and select Start my server. It picks ComfyUI and the cheapest server in stock that fits, and it can stop the server for you after a time you choose.

To choose every setting yourself, use Deploy:

  1. On Choose GPU, pick a configuration with enough VRAM and select Continue.
  2. On Choose template, select the Generate images filter, then the template card, and select Continue.
  3. On Configure, name the server and keep the suggested disk size. Image models are large, so do not shrink it much.
  4. On Review, check Per hour and select Start my server.

The progress screen shows the server being prepared. You are not charged for compute until it is running. Some new servers are reviewed by our team first; the screen says so, and you are not charged while you wait. The full flow is in Deploy a server.

Step 4: Open the tool and make a first picture

When the status shows Running, the server is billed, but the tool may still be installing. The first start is the slow one: ComfyUI is usually ready a few minutes after Running, while Fooocus (which downloads its model) and Forge (which installs a lot of software) can take up to about 25 minutes. For ComfyUI the server page shows Finishing setup until it is ready. Later starts reuse what is on the disk and are much faster.

  1. Open the server, select the Connect tab, then Open app.
  2. Sign in with the user name admin and the password shown on the Connect tab under Sign in with.
  3. Make a picture:
    • ComfyUI: open Templates, choose Image Generation, replace the prompt and select Run.
    • Fooocus: type a prompt and select Generate.
    • Forge: add a checkpoint first (Step 5), choose it at the top of the page, type a prompt and select Generate.

The first picture is slower because the model is loaded into GPU memory. Later ones are quicker. A click-by-click version for ComfyUI is in Generate images with ComfyUI.

Step 5: Load SDXL or FLUX checkpoints

Every tool reads models from a folder on the server disk, under /workspace:

Tool Folder for main models
ComfyUI /workspace/ComfyUI/models/checkpoints
Forge /workspace/stable-diffusion-webui-forge/models/Stable-diffusion

To add a model, copy its download address from the model's page, open a terminal on the server with the command on the Connect tab, and run:

cd /workspace/ComfyUI/models/checkpoints
curl -fL -O MODEL_ADDRESS

Reload the page and pick the new file in the Load Checkpoint node (ComfyUI) or the checkpoint list (Forge).

For FLUX in ComfyUI, the simplest route is a FLUX build packaged as a single checkpoint file for ComfyUI; it loads with the same Load Checkpoint node. Builds that come as separate parts (the diffusion model, text encoders and VAE) go into the matching folders under models and need a FLUX workflow; ComfyUI's Templates window has examples. Some models, including FLUX.1 dev, ask you to accept their licence and download with a Hugging Face access token. Store the token as a secret rather than typing it into shared commands; see Secrets.

You can also start ComfyUI with a different first model: put the checkpoint's download address in the MODEL_URL variable on the Configure step. It downloads only when the checkpoints folder is empty.

Files on the disk stay when you stop the server, so a model downloads once, not at every start.

Step 6: Keep your pictures and control the cost

The server disk is the only copy of your pictures until you copy them out. Download them from the browser, or with scp or rsync; Move data to and from a server shows every method. Destroy deletes the disk and everything on it; Stop keeps it.

Image work is bursty, and a server left on overnight is the usual waste:

  • Stop when you finish. Stopping ends the compute charge. The disk is kept and still billed, by the second, until you destroy the server.
  • Add an automatic stop. Under the server's Settings, Automation, you can stop it after a running time or when the GPU has been idle. See Automation.
  • Set a budget. Control costs shows the monthly budget and low-balance warning.

How billing by the second works has worked examples of compute and disk charges.

Common problems

  • Out of memory. Lower the resolution or batch size, use a reduced-precision build, or deploy on a GPU with more VRAM.
  • The page does not open right after Running. The tool is still installing. Wait for Finishing setup to clear, or give Fooocus and Forge more time on their first start.
  • The model is not in the list. Check the folder name and reload the page.
  • The template is unavailable for a GPU. That GPU generation is not supported by the template yet; choose another card.

Next steps

For a deeper ComfyUI walk-through, read How to run ComfyUI on a cloud GPU. To compare high-memory GPUs for bigger jobs, see Rent an H100 or A100 by the hour. When you are ready, create an account and start a ComfyUI server.

Try it on a real GPU server

Create a free account and add a balance from $10. Servers are billed by the second, and the review step shows the price per hour before you request one.

Related guides