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

Rent a GPU on Deploy, then open a terminal in JupyterLab or over SSH. Install Kolors from the official Kwai-Kolors/Kolors repository the way the README prints, download Kwai-Kolors/Kolors into weights/Kolors, and run scripts/sample.py. Copy the image off the instance before you destroy it, because destroying the instance deletes its disk.

Another text-to-image repository, whose README and model cards publish no diffusers VRAM figure, is How to run Qwen-Image on a cloud GPU. HiDream-I1’s README names 50, 28, and 16 inference steps and publishes no VRAM figure: How to run HiDream-I1 on a cloud GPU. How published FLUX and SDXL weight sizes are read: How much VRAM do I need for FLUX and SDXL. Installing ComfyUI itself is How to install ComfyUI and ComfyUI-Manager on a cloud GPU. If the process runs out of memory: How to fix CUDA out of memory on a cloud GPU. The Gradio script calls launch() with no host and no port: 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 still the unfilled template Copyright [yyyy] [name of copyright owner]. The README says the code of this project is open-sourced under the Apache-2.0 license. The GitHub license field on 2026-11-13 was Apache-2.0. The model cards for Kwai-Kolors/Kolors and Kwai-Kolors/Kolors-diffusers that day had cardData.license apache-2.0, top-level license null, and gated false, lastModified 2024-07-12T09:26:09.000Z and 2024-07-12T03:50:24.000Z. Both cards set language to zh and en. This page does not treat that field as a full language-support list. MODEL_LICENSE is a separate agreement, release date 2024/7/6. English section 2.a grants a royalty-free limited license. English section 2.c says that if monthly active users of all products or services made available by or for the licensee, or its affiliates, do not exceed 300 million monthly active users in the preceding calendar month, registration with the licensor is deemed to have obtained the corresponding business license, and that a count greater than 300 million requires a request the licensor may grant or not. That 300 million figure is the upstream license text. The README says the weights are fully open for academic research, and that commercial use under the licensing terms starts by sending the questionnaire in the repository to kwai-kolors@kuaishou.com. English section 7 says the agreement is governed by the laws of China, and the parenthetical in that sentence excludes Hong Kong, Macau, and Taiwan for the purpose of that agreement. That sentence is the license’s governing-law clause. Read LICENSE and MODEL_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 README says about memory

The README requirements are Python 3.8 or later, PyTorch 1.13.1 or later, Transformers 4.26.1 or later, and a recommended CUDA 11.7 or later (read 2026-11-13). The README, scripts/sample.py, requirements.txt, and the two model cards this page read print no GPU GB figure. scripts/sample.py calls the pipeline with height 1024 and width 1024. Those are image sizes in the script. This page does not treat them as a GPU GB figure. The README has a human-assessment table and a machine-assessment table. This page does not copy those tables. The acknowledgments thank the ChatGLM3 repository. scripts/sample.py loads text_encoder from weights/Kolors/text_encoder through ChatGLMModel. It does not print a separate hub id for that directory.

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-13T11:07:05.801Z. GET /v1/public/gpu-catalog the same day (generated_at 2026-11-13T11:07:06.881Z) 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. There is no upstream GB cutoff to match these values against. The smallest vram_gb in that file is 8, on RTX 2080. Catalog RTX 4090 is 24. This page did not run Kolors and does not mark a row as enough. Which listing you can start is on Deploy.

The catalog template list had no Kolors 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 and download

On Deploy, choose Raw GPU. The README’s clone and install, copied. requirements.txt pins torch==1.13.1, torchvision==0.14.1, transformers==4.42.4, tokenizers==0.13.2, safetensors==0.3.3, and diffusers==0.28.2. The README’s later diffusers section says to upgrade to diffusers 0.30.0.dev0. Those two files do not name the same diffusers version.

apt-get install git-lfs
git clone https://github.com/Kwai-Kolors/Kolors
cd Kolors
conda create --name kolors python=3.8
conda activate kolors
pip install -r requirements.txt
python3 setup.py install

requirements.txt pins tokenizers==0.13.2 and safetensors==0.3.3 on the same line list as transformers==4.42.4. The Transformers setup.py at tag v4.42.4 puts tokenizers>=0.19,<0.20 and safetensors>=0.4.1 in install_requires, and sets python_requires to >=3.8.0. Those two pins are outside those ranges, so the README pip install -r requirements.txt line asks for versions that file does not accept. The two commands below drop only those two pins and pass the ranges from that setup.py. They are this page’s. They were not run.

# requirements.txt pins tokenizers==0.13.2 and safetensors==0.3.3.
# transformers v4.42.4 install_requires asks for tokenizers>=0.19,<0.20 and safetensors>=0.4.1.
# These two commands are this page's. They were not run.
grep -v -E '^(tokenizers|safetensors)==' requirements.txt > /tmp/kolors-requirements.txt
pip install -r /tmp/kolors-requirements.txt 'tokenizers>=0.19,<0.20' 'safetensors>=0.4.1'

python3 setup.py install stays the README command above. Run it after the marked pip line.

The README’s weight download, copied. The second block is the README’s alternative.

huggingface-cli download --resume-download Kwai-Kolors/Kolors --local-dir weights/Kolors
git lfs clone https://huggingface.co/Kwai-Kolors/Kolors weights/Kolors

The commits API for the default branch master listed 038818d244ed103056abd10f429729a26af4d239, committed 2024-11-13T05:17:23Z. README.md was a9dedafa5e9dc95047dfb3c3c86b81818966de75, committed 2024-11-13T04:24:04Z. The 2024.07.06 news line says the model is bilingual in Chinese and English and supports a context length of 256 tokens. That sentence is the README’s.

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. requirements.txt pins torch==1.13.1. This page did not re-test Kolors on an RTX 5090. Catalog RTX 5090 and RTX 5090D are 32. That is the catalog number only.

The documented inference script

The README’s inference command, copied. The comment is the README’s.

python3 scripts/sample.py "一张瓢虫的照片,微距,变焦,高质量,电影,拿着一个牌子,写着“可图”"
# The image will be saved to "scripts/outputs/sample_text.jpg"

scripts/sample.py saves {repo}/scripts/outputs/sample_test.jpg. That path is not the path in the README comment. The script calls pipe.to("cuda") and pipe.enable_model_cpu_offload(). It passes num_inference_steps 50, guidance_scale 5.0, height 1024, width 1024, and a generator seed of 66. The save line does not create the output directory. scripts/sampleui.py does call os.makedirs on scripts/outputs. This page did not run the script.

The README also comments that the IP-Adapter-Plus, inpainting, and IP-Adapter-FaceID-Plus samples save under scripts/outputs/, and that the ControlNet samples save under controlnet/outputs/. This page does not paste those prompt strings. The README links a Dreambooth-LoRA directory. This page does not copy that directory’s commands.

Diffusers

The README’s diffusers install says to upgrade to 0.30.0.dev0 by cloning https://github.com/huggingface/diffusers and running python3 setup.py install. Its notes say the pipeline uses EulerDiscreteScheduler by default and recommends guidance scale=5.0 and num_inference_steps=50 with that scheduler. They also say EDMDPMSolverMultistepScheduler with guidance scale=5.0 and num_inference_steps=25 is a good default for that scheduler. The snippet, copied. image.show() does not write a file.

import torch
from diffusers import KolorsPipeline
pipe = KolorsPipeline.from_pretrained(
    "Kwai-Kolors/Kolors-diffusers",
    torch_dtype=torch.float16,
    variant="fp16"
).to("cuda")
prompt = '一张瓢虫的照片,微距,变焦,高质量,电影,拿着一个牌子,写着"可图"'
image = pipe(
    prompt=prompt,
    negative_prompt="",
    guidance_scale=5.0,
    num_inference_steps=50,
    generator=torch.Generator(pipe.device).manual_seed(66),
).images[0]
image.show()

Gradio

The README’s web-demo line, copied:

python3 scripts/sampleui.py

scripts/sampleui.py ends with gradio_interface().launch(). That call passes no host and no port. This page does not state a port number. infer writes sample_test.jpg under scripts/outputs, and if that name exists it writes sample_test_ plus a counter plus .jpg. It creates the directory. Forward whichever port the process prints with how to use SSH port forwarding on a cloud GPU. This page did not start the app.

ComfyUI

The 2024.07.09 news line says Kolors supports ComfyUI and links the ComfyUI manual-install section. The same line thanks the repository kijai/ComfyUI-KwaiKolorsWrapper. The open-source plan marks ComfyUI as checked. The ComfyUI examples top-level directory list on 2026-11-13 had no directory named kolors. Examples HEAD was f9431bb000ce792094ff345446e22cac1ea6cef3, committed 2025-11-26T20:33:58Z. This page does not add that wrapper’s install commands. Installing ComfyUI itself is How to install ComfyUI and ComfyUI-Manager on a cloud GPU.

When it fails

Dependency pins. pip install -r requirements.txt includes tokenizers==0.13.2 and safetensors==0.3.3 together with transformers==4.42.4. The Transformers setup.py at tag v4.42.4 requires tokenizers>=0.19,<0.20 and safetensors>=0.4.1. Use the marked pip lines in the install section.

CUDA out of memory. The README and the model cards this page read print no GPU GB figure. scripts/sample.py calls enable_model_cpu_offload(). That call is not a GB figure. 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.

Two output names. The README comment says scripts/outputs/sample_text.jpg. scripts/sample.py saves scripts/outputs/sample_test.jpg and does not create the directory.

Save the image, then destroy

Copy scripts/outputs before you destroy the instance. The diffusers snippet shows the image and does not write a path. 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 GPU memory figure do the Kolors README and model cards state?

The README requirements are Python 3.8 or later, PyTorch 1.13.1 or later, Transformers 4.26.1 or later, and a recommended CUDA 11.7 or later. The README, scripts/sample.py, requirements.txt, and the model cards for Kwai-Kolors/Kolors and Kwai-Kolors/Kolors-diffusers print no GPU GB figure. scripts/sample.py calls the pipeline at height 1024 and width 1024. Those are image sizes in the script, not a GPU GB figure. The smallest vram_gb in gpu-prices.json (updated_at 2026-11-13T11:07:05.801Z) is 8, on RTX 2080. There is no upstream GB cutoff to match catalog rows against. This page did not run Kolors and does not mark a row as enough. Which listing you can start is on https://cloudgpu.app/deploy.

Which command generates an image, and where is it saved?

The README inference command is python3 scripts/sample.py with the prompt the README prints, and its comment says the image will be saved to scripts/outputs/sample_text.jpg. scripts/sample.py saves scripts/outputs/sample_test.jpg and does not create that directory. The diffusers snippet calls image.show and does not write a file. scripts/sampleui.py writes sample_test.jpg under scripts/outputs and adds a counter when that name exists. Its launch call passes no host and no port. This page did not run the commands.

Does the repository document ComfyUI?

The README says Kolors supports ComfyUI and links the ComfyUI manual-install section. The same news line thanks the repository kijai/ComfyUI-KwaiKolorsWrapper. This page does not add the install commands for that wrapper. The ComfyUI examples top-level directory list on 2026-11-13 had no directory named kolors. Examples HEAD was f9431bb000ce792094ff345446e22cac1ea6cef3. The open-source plan marks ComfyUI as checked.

Which license covers the code and the weights?

The repository LICENSE file is the Apache License, Version 2.0, and the appendix copyright line is still the unfilled template Copyright [yyyy] [name of copyright owner]. The README says the code is open-sourced under the Apache-2.0 license. The GitHub license field on 2026-11-13 was Apache-2.0. The cards for Kwai-Kolors/Kolors and Kwai-Kolors/Kolors-diffusers had cardData.license apache-2.0, top-level license null, and gated false. MODEL_LICENSE is a separate agreement. Its English section 2.c says registration is treated as the business license when monthly active users do not exceed 300 million in the preceding calendar month, and that a count greater than 300 million requires a separate request. That 300 million figure is the upstream license text. 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. Read both files before you redistribute the program or the weights.

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

  • Kolors README (Python 3.8, PyTorch 1.13.1, Transformers 4.26.1, CUDA 11.7, the clone and requirements.txt install, Kwai-Kolors/Kolors, scripts/sample.py, the comment scripts/outputs/sample_text.jpg, the diffusers snippet for Kwai-Kolors/Kolors-diffusers, scripts/sampleui.py, the ComfyUI news line, Apache-2.0 for the code, the 300 million monthly-active-user sentence): https://github.com/Kwai-Kolors/Kolors/blob/master/README.md commit a9dedafa5e9dc95047dfb3c3c86b81818966de75. Repository HEAD 038818d244ed103056abd10f429729a26af4d239, committed 2024-11-13T05:17:23Z
  • scripts/sample.py (sample_test.jpg, height 1024, width 1024, 50 steps, guidance_scale 5.0, seed 66, enable_model_cpu_offload): commit 420b23a14ae7eb270c24b0c99a38c70bd09ff23a
  • scripts/sampleui.py (launch() with no host or port, sample_test.jpg under scripts/outputs): commit 8872a26aa881fe7846ba4289f6def0374133e326
  • requirements.txt (torch==1.13.1, diffusers==0.28.2, transformers==4.42.4, tokenizers==0.13.2, safetensors==0.3.3): commit 54495082747af093b0f35bd494f8018c77c55ae6
  • Transformers setup.py at tag v4.42.4 (install_requires includes tokenizers>=0.19,<0.20 and safetensors>=0.4.1; python_requires>=3.8.0): https://github.com/huggingface/transformers/blob/v4.42.4/setup.py read 2026-11-13
  • LICENSE (Apache-2.0, unfilled copyright template): commit 420b23a14ae7eb270c24b0c99a38c70bd09ff23a. GitHub license field Apache-2.0
  • MODEL_LICENSE (release date 2024/7/6, section 2.c 300 million monthly active users, section 7 governing law): commit 3fd779bd04d4b0bafc809d5a67a6cca324dc47c4
  • Model cards Kwai-Kolors/Kolors and Kwai-Kolors/Kolors-diffusers (apache-2.0, gated false, no GPU GB figure in the card metadata or the Kolors README text this page read), read 2026-11-13
  • ComfyUI examples top-level directories (no kolors directory): https://github.com/comfyanonymous/ComfyUI_examples commit f9431bb000ce792094ff345446e22cac1ea6cef3
  • Public GPU memory: https://cloudgpu.app/gpu-prices.json (updated_at 2026-11-13T11:07:05.801Z) and https://cloudgpu.app/v1/public/gpu-catalog (generated_at 2026-11-13T11:07:06.881Z). GET /v1/public/compute-capabilities returned feature flags and no GPU list. The catalog had no Kolors 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).