How to run Sana text-to-image on a cloud GPU

Rent a GPU on Deploy, then open a terminal in JupyterLab or over SSH. Install Sana from the official NVlabs/Sana repository the way docs/installation.md prints, then run the diffusers snippet or app/app_sana.py. Copy sana.png, or the directory the script writes, off the instance before you destroy it, because destroying the instance deletes its disk.

FLUX in ComfyUI is How to run FLUX.1-dev in ComfyUI on a cloud GPU. OmniGen2’s README says approximately 17GB: How to run OmniGen2 on a cloud GPU. Kolors, whose README and model cards print no GPU GB figure, is How to run Kolors text-to-image on a cloud GPU. How published FLUX and SDXL weight sizes are read: How much VRAM do I need for FLUX and SDXL. If the process runs out of memory: How to fix CUDA out of memory on a cloud GPU. The Gradio script binds 0.0.0.0 and the port from DEMO_PORT. The tunnel page is How to use SSH port forwarding on a cloud GPU.

The repository LICENSE file is the Apache License, Version 2.0, January 2004. The appendix copyright line is Copyright 2024 Nvidia. The README news line dated 2025/1/11 says the code-base license changed to Apache 2.0. The GitHub license field on 2026-11-13 was Apache-2.0. The model cards for Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers, Efficient-Large-Model/SANA1.5_1.6B_1024px, and Efficient-Large-Model/Sana_1600M_1024px_BF16 that day had cardData.license apache-2.0 and gated false, lastModified 2026-07-31T14:28:49.000Z, 2026-07-31T14:28:48.000Z, and 2026-07-31T14:28:55.000Z. Read LICENSE before you redistribute the program or the weights.

The commands below are copied from the upstream files named in each step. They were not run on a CloudGPU instance for this page. Anything this page adds around them is marked.

What the docs say about memory

docs/installation.md prints this table (commit e95be26ad5607410288ad11dbb771f328f0eef63, 2026-10-19). The note under it says all the tests are done on A100 GPUs and that different GPU versions may vary.

Model VRAM Required
Sana-0.6B 9GB
Sana-1.6B 12GB
4-bit Quantized < 8GB

docs/sana.md repeats the three inference rows as Inference (0.6B) 9GB, Inference (1.6B) 12GB, and Inference (4-bit) less than 8GB, and adds a Training row of 32GB. Its note says all tests are done on A100 GPUs and that different GPU versions may vary. The 32GB row is that file’s training row. This page does not copy the training commands.

The README says the models are deployable on laptop GPUs with less than 8GB VRAM via 4-bit quantization. A 2025/1/24 news line says 4-bit Sana runs within 8GB GPU VRAM. A 2025/1/12 news line says DC-AE tiling makes 4096x4096 inference within 22GB GPU memory, and that with model offload and 8-bit or 4-bit quantization the 4K run is within 8GB GPU VRAM. docs/ComfyUI/comfyui.md heads one workflow “A sample workflow for Sana 4096x4096 image (18GB GPU is needed)”. Those sentences are separate from the installation table. This page did not remeasure them. The README also has a throughput table. This page does not copy it. docs/4bit_sana.md is the 4-bit page. This page does not copy that file’s install commands. docs/installation.md also links a SANA-Sprint page and a SANA-Video page. This page does not copy those.

GET /v1/public/compute-capabilities does not list GPUs. It returns feature flags. The memory column is vram_gb from gpu-prices.json, updated_at 2026-11-13T13:09:18.523Z. GET /v1/public/gpu-catalog the same day (generated_at 2026-11-13T13:09:40.223Z) listed the same names and the same vram_gb values, plus Ascend 910B at 64, which is not in gpu-prices.json and is not listed here. The catalog response also includes an availability field. This page does not copy it. Every prices row has gpu_count 1. The smallest vram_gb in that file is 8, on RTX 2080. That 8 is not less than 8. Catalog rows below 9 are RTX 2080 (8). Catalog rows below 12 are RTX 2080 (8), RTX 3080 (10), and RTX 2080 Ti (11). Catalog rows below 18, and the same rows are also the ones below 22, are RTX 2080 (8), RTX 3080 (10), RTX 2080 Ti (11), RTX 3080 Ti (12), and V100 16G (16). The next catalog value after 16 is 24. Catalog A100 40G is 40 and catalog A100 80G is 80. The docs name A100 and do not print 40 or 80 in that note. Those catalog numbers are not the docs’ measurements. This page did not run Sana and does not mark a row as enough. Which listing you can start is on Deploy.

The catalog template list had no Sana template.

Catalog name vram_gb
RTX 2080 8
RTX 3080 10
RTX 2080 Ti 11
RTX 3080 Ti 12
V100 16G 16
A30 24
RTX 3090 24
RTX 4090 24
RTX 4090D 24
RTX 4080 SUPER 32G 32
RTX 5090 32
RTX 5090D 32
V100 32G 32
A100 40G 40
A800 40G 40
A40 48
RTX 4090 48G 48
RTX 4090D 48G 48
RTX A6000 48
NVIDIA RTX PRO 5000 72G 72
RTX PRO 5000 72G 72
A100 80G 80
A800 80G 80
H800 80
RTX 6000D 83
H20 96G 96
RTX PRO 6000 96G 96
RTX PRO 6000 Max-Q 96
H20-3e 141G 141

Install

On Deploy, choose Raw GPU. docs/installation.md says Python >= 3.11 and PyTorch 2.9.1+cu128, installed by environment_setup.sh. The quick install, copied. The README’s quick start is git clone and then cd Sana && ./environment_setup.sh sana.

git clone https://github.com/NVlabs/Sana.git
cd Sana
bash ./environment_setup.sh sana

environment_setup.sh creates a conda environment named by its argument when that argument is set, with python=3.11, installs cuda-toolkit=12.8, and then installs torch==2.9.1, torchvision==0.24.1, and torchaudio==2.9.1 from the cu128 index. pyproject.toml sets requires-python to >=3.11 and pins torch==2.9.1. The script also installs more packages after that torch line, and set -e is on. conda activate inside that script applies only to the script’s own process. Its last line prints conda activate sana when the argument is sana. The command below is that line, run in the shell that will start inference. It is this page’s. It was not run. A conda environment is the script’s first step when you pass sana: How to set up a conda environment on a cloud GPU.

# environment_setup.sh activates conda only inside its own process.
# Its last line says to activate the environment. This command is this page's. It was not run.
conda activate sana

The commits API for the default branch main listed 27303b8de8e3f02f5dc96acf14705a0e04fca355, committed 2026-11-12T08:45:20Z. README.md was f0a31406b5c33f67553b46edb7ef519919fce457, committed 2026-10-23T08:49:24Z. environment_setup.sh was 9f7141168fe40c1e004f3577dc1a677ff9e8085e, committed 2026-06-16T13:20:09Z.

The RTX 5090 guide says that card is compute capability 12.0 (sm_120) and that PyTorch 2.7 and later, on a build for CUDA 12.8 or newer, is the line that announced support. The setup script pins torch==2.9.1 from the cu128 index. This page did not re-test Sana on an RTX 5090. Catalog RTX 5090 and RTX 5090D are 32. That is the catalog number only.

The installation page’s optional Docker block, copied:

docker build -t sana .
docker run --gpus all -it sana python scripts/inference.py

Diffusers

The installation page says to upgrade diffusers, then run this snippet. image[0].save("sana.png") writes sana.png in the working directory. The height and width in the call are 1024. Those are image sizes in the snippet. This page does not treat them as a GPU GB figure.

pip install git+https://github.com/huggingface/diffusers
import torch
from diffusers import SanaPipeline

pipe = SanaPipeline.from_pretrained(
    "Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers",
    torch_dtype=torch.bfloat16,
)
pipe.to("cuda")

pipe.vae.to(torch.bfloat16)
pipe.text_encoder.to(torch.bfloat16)

prompt = 'a cyberpunk cat with a neon sign that says "Sana"'
image = pipe(
    prompt=prompt,
    height=1024,
    width=1024,
    guidance_scale=4.5,
    num_inference_steps=20,
    generator=torch.Generator(device="cuda").manual_seed(42),
)[0]

image[0].save("sana.png")

docs/sana.md also prints a SanaPAGPipeline snippet that saves sana.png, and a native pipeline snippet that calls save_image(image, 'output/sana.png', nrow=1, normalize=True, value_range=(-1, 1)). The native import is from app.sana_pipeline import SanaPipeline, and the checkpoint in that snippet is hf://Efficient-Large-Model/SANA1.5_1.6B_1024px/checkpoints/SANA1.5_1.6B_1024px.pth. This page did not run the snippets.

The same file’s batch commands, copied. scripts/inference.py joins {work_dir}/vis and writes a .jpg there. When --work_dir is omitted, work_dir is model_path with the last two path parts dropped. The commands below do not pass --work_dir.

python scripts/inference.py \
    --config=configs/sana_config/1024ms/Sana_1600M_img1024.yaml \
    --model_path=hf://Efficient-Large-Model/Sana_1600M_1024px/checkpoints/Sana_1600M_1024px.pth \
    --txt_file=asset/samples/samples_mini.txt

Gradio

The Gradio block in docs/sana.md, copied:

DEMO_PORT=15432 \
python app/app_sana.py \
    --share \
    --config=configs/sana_config/1024ms/Sana_1600M_img1024.yaml \
    --model_path=hf://Efficient-Large-Model/Sana_1600M_1024px_BF16/checkpoints/Sana_1600M_1024px_BF16.pth \
    --image_size=1024

app/app_sana.py sets DEMO_PORT from the environment and defaults it to 15432. The launch call passes server_name="0.0.0.0" and server_port=DEMO_PORT. --share is in the documented command. Forward port 15432 with how to use SSH port forwarding on a cloud GPU. When CUDA is available, the script loads a tokenizer and a causal model from --shield_model_path before the UI starts. The documented command does not pass that flag. The default is a hub id this page does not print. Copy it from app/app_sana.py. save_image_sana builds output/online_demo_img/{date}/{uuid}_{seed}.png and writes the file only when save_img is true. This page found no call of that function. This page did not start the app. app/app_sana.py was commit 95c9e7c4a9f4645646b48fb81273af6b30a14246, committed 2025-12-10T01:51:08Z. docs/sana.md was 5a59e94fa83491845ce6d1eab809d2b65c3541fe, committed 2026-06-09T03:34:01Z.

ComfyUI

docs/ComfyUI/comfyui.md says the text encoder is Gemma2 2B. A config field also names a text encoder. This page does not print that config value. The usage block, copied. python main.py does not pass a port. The same page’s “Original Repo” link is city96/ComfyUI_ExtraModels. The clone in the block is lawrence-cj/ComfyUI_ExtraModels. The 4096 heading is the 18GB sentence above. The ComfyUI examples top-level directory list on 2026-11-13 had no directory named sana. Examples HEAD was f9431bb000ce792094ff345446e22cac1ea6cef3, committed 2025-11-26T20:33:58Z. Installing ComfyUI itself is How to install ComfyUI and ComfyUI-Manager on a cloud GPU.

git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
git clone https://github.com/lawrence-cj/ComfyUI_ExtraModels.git custom_nodes/ComfyUI_ExtraModels
python main.py

When it fails

CUDA out of memory. The figures in the memory section are the ones those files print. This page did not add a low-memory flag. If the process raises that error, use how to fix CUDA out of memory on a cloud GPU.

“CUDA error: no kernel image is available for execution on the device” on an RTX 5090. See the install section. This page did not re-test the pinned torch build on that card.

The setup script stops. environment_setup.sh sets set -e before the later package installs. This page did not run the script and does not name a second install that replaces it.

Save the image, then destroy

Copy sana.png from the diffusers snippet, output/sana.png from the native snippet, and {work_dir}/vis from scripts/inference.py, before you destroy the instance. Save your work before you destroy a cloud GPU is the checklist. The terms say data on local instance storage is permanently deleted when the instance is destroyed.

The pricing page FAQ states the billing rule in these words:

Per-minute options have a 1-minute minimum; unused prepaid minutes are refunded when you destroy the instance. Some configurations use whole-hour billing with a 1-hour minimum; unused time within a charged hour is not refunded on voluntary stop. The billing period, minimum charge and initial prepayment are shown before confirmation. No subscription.

Frequently asked questions

What VRAM figures do the Sana docs print?

docs/installation.md lists Sana-0.6B at 9GB, Sana-1.6B at 12GB, and 4-bit Quantized at less than 8GB. docs/sana.md repeats those three inference rows and adds a Training row of 32GB. Both notes say the tests were done on A100 GPUs and that different GPU versions may vary. The README says 4K inference is within 22GB GPU memory, and within 8GB GPU VRAM with model offload and 8-bit or 4-bit quantization. The ComfyUI doc heading for the 4096 workflow says 18GB GPU is needed. The smallest vram_gb in gpu-prices.json (updated_at 2026-11-13T13:09:18.523Z) is 8, on RTX 2080, which is not less than 8. This page did not run Sana and does not mark a row as enough. Which listing you can start is on https://cloudgpu.app/deploy.

Which command writes an image, and where is the file?

The installation page diffusers snippet calls image[0].save with the file name sana.png. The native pipeline section in docs/sana.md calls save_image with output/sana.png. scripts/inference.py writes jpg files under {work_dir}/vis. When the work_dir flag is omitted, work_dir is model_path with the last two path parts dropped. The documented batch command does not pass that flag. This page did not run the commands.

Which port does the Gradio app use, and does the repository document ComfyUI?

docs/sana.md starts the demo with DEMO_PORT=15432 and python app/app_sana.py --share. app/app_sana.py defaults DEMO_PORT to 15432 and launches with server_name 0.0.0.0 and that port. The ComfyUI doc clones ComfyUI and lawrence-cj/ComfyUI_ExtraModels and runs python main.py. That command does not pass a port. The same page says the text encoder is Gemma2 2B. This page did not start either UI.

Which license covers the code and the weights?

The repository LICENSE is the Apache License, Version 2.0, and the appendix copyright line is Copyright 2024 Nvidia. The README news line says the code-base license changed to Apache 2.0. The GitHub license field on 2026-11-13 was Apache-2.0. The cards for Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers, Efficient-Large-Model/SANA1.5_1.6B_1024px, and Efficient-Large-Model/Sana_1600M_1024px_BF16 had cardData.license apache-2.0 and gated false. Section 2 of the Apache file grants a no-charge, royalty-free copyright license. That wording is the upstream license, not a CloudGPU price and not a storage allowance.

Sources (read 2026-11-13, Asia/Shanghai)

  • Sana README (quick start ./environment_setup.sh sana, the diffusers snippet, the less-than-8GB sentence, the 8GB and 22GB news lines, the Apache 2.0 news line): https://github.com/NVlabs/Sana/blob/main/README.md commit f0a31406b5c33f67553b46edb7ef519919fce457. Repository HEAD 27303b8de8e3f02f5dc96acf14705a0e04fca355, committed 2026-11-12T08:45:20Z
  • docs/installation.md (Python >= 3.11, PyTorch 2.9.1+cu128, the 9GB / 12GB / less-than-8GB table, the A100 note, the diffusers snippet, the Docker block): commit e95be26ad5607410288ad11dbb771f328f0eef63
  • docs/sana.md (inference rows plus Training 32GB, SanaPAGPipeline, native output/sana.png, the batch command, DEMO_PORT=15432): commit 5a59e94fa83491845ce6d1eab809d2b65c3541fe
  • docs/ComfyUI/comfyui.md (Gemma2 2B, the clone of lawrence-cj/ComfyUI_ExtraModels, python main.py, the 18GB heading): commit 5a59e94fa83491845ce6d1eab809d2b65c3541fe
  • environment_setup.sh (python=3.11, cuda-toolkit=12.8, torch==2.9.1 from the cu128 index, closing line conda activate sana when the argument is sana): commit 9f7141168fe40c1e004f3577dc1a677ff9e8085e
  • app/app_sana.py (DEMO_PORT default 15432, server_name 0.0.0.0, --shield_model_path default this page does not print, save_image_sana): commit 95c9e7c4a9f4645646b48fb81273af6b30a14246
  • scripts/inference.py ({work_dir}/vis, work_dir from model_path when omitted): commit 01dbedcb5842cc8650713ae60118b70fbe4b0864, committed 2026-06-07T15:22:58Z
  • pyproject.toml (requires-python >=3.11, torch==2.9.1): commit 3f7bc74382b4b1236707375025e5fddc5797923c
  • LICENSE (Apache 2.0, appendix Copyright 2024 Nvidia): commit cb29d1c98c5017cfe9f2216c596806ac63208216. GitHub license field Apache-2.0
  • Model cards Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers, Efficient-Large-Model/SANA1.5_1.6B_1024px, and Efficient-Large-Model/Sana_1600M_1024px_BF16 (cardData.license apache-2.0, gated false), read 2026-11-13
  • ComfyUI examples top-level directories (no sana directory): https://github.com/comfyanonymous/ComfyUI_examples commit f9431bb000ce792094ff345446e22cac1ea6cef3
  • Public GPU memory: https://cloudgpu.app/gpu-prices.json (updated_at 2026-11-13T13:09:18.523Z) and https://cloudgpu.app/v1/public/gpu-catalog (generated_at 2026-11-13T13:09:40.223Z). GET /v1/public/compute-capabilities returned feature flags and no GPU list. The catalog had no Sana template

Cards you can start are on the Deploy page. Prices are on https://cloudgpu.app/pricing and are not repeated here.

Last updated: 2026-11-13 (Asia/Shanghai).