How to run BAGEL on a cloud GPU

Rent a GPU on Deploy, then open a terminal in JupyterLab or over SSH. Install BAGEL from the official ByteDance-Seed/Bagel repository the way the README prints, download ByteDance-Seed/BAGEL-7B-MoT with the snippet that file prints, and run app.py or the cells in inference.ipynb. Copy the image from the notebook output or the browser before you destroy the instance, because destroying the instance deletes its disk.

OmniGen2’s README says approximately 17GB: How to run OmniGen2 on a cloud GPU. Step1X-Edit’s README prints peak GPU memory from 18GB to 49.8GB and recommends 80GB: How to run Step1X-Edit on a cloud GPU. Qwen-Image’s README and model cards print no diffusers VRAM figure: How to run Qwen-Image on a cloud GPU. FLUX.1 Kontext in ComfyUI is How to run FLUX.1 Kontext in ComfyUI on a cloud GPU. Opening the notebook is How to run a Jupyter notebook on a cloud GPU. The Gradio app defaults to 127.0.0.1 port 7860. The tunnel page is How to use SSH port forwarding on a cloud GPU. If the process runs out of memory: How to fix CUDA out of memory on a cloud GPU.

The README’s license line says BAGEL is licensed under the Apache 2.0. The repository LICENSE file is the Apache License, Version 2.0, January 2004. The appendix copyright line is the unfilled example Copyright [yyyy] [name of copyright owner]. The first cell of inference.ipynb says Copyright 2025 Bytedance Ltd. and/or its affiliates and SPDX-License-Identifier: Apache-2.0. The GitHub license field on 2026-11-13 was Apache-2.0. The model card for ByteDance-Seed/BAGEL-7B-MoT that day had cardData.license apache-2.0 and gated false, lastModified 2026-01-09T09:27:26.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 README says about memory

The README quick start (commit a53eea0b3e38748fb28d40deb5f1ea37fdcb8363, 2025-06-15) prints three comments:

  • python app.py is for a 32GB+ VRAM GPU or multiple GPUs.
  • python app.py --mode 2 --zh is for a 12~32GB VRAM GPU. The comment recommends NF4 quantization and says to use the Chinese interface.
  • python app.py --mode 3 is for a 22~32GB VRAM GPU. The comment says it is not recommended to use INT8 quantization.

app.py defaults --mode to 1. The command python app.py does not pass --mode, so the default is 1. Mode 1 calls load_checkpoint_and_dispatch. Mode 2 is the NF4 branch. Mode 3 is the INT8 branch. app.py was commit 2f7d107c366a0a6befc1de2376bd37af0a0ccc58, committed 2025-05-30T18:32:29Z.

inference.ipynb sets max_mem_per_gpu = "40GiB" and the comment says to modify it according to your GPU setting, and that on an A100, 80 GiB is sufficient to load on a single GPU. That comment is the notebook’s. This page did not remeasure it. app.py does not use that variable. It passes max_memory={i: "80GiB" for i in range(torch.cuda.device_count())} to infer_auto_device_map. That 80GiB is the dictionary in app.py. It is not the README’s 32GB+ comment. The notebook’s load_checkpoint_and_dispatch call sets offload_folder to /tmp/offload. app.py sets offload_folder to offload in all three mode branches. inference.ipynb was commit 1f9297c9ce5357983555c078afbd04864bc3d99e, committed 2025-08-15T13:56:20Z.

The README has understanding, text-to-image, and editing tables. This page does not copy them. The repository HEAD on 2026-11-13 was a2fa77dd8caeefc41e6607ae0ec17408d3f4ee9f, committed 2026-05-04T17:01:02Z.

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-13T14:01:30.465Z. GET /v1/public/gpu-catalog the same day (generated_at 2026-11-13T14:01:31.438Z) 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. Every catalog row has min_gpu_count 1. The smallest vram_gb in that file is 8, on RTX 2080. Catalog rows below 12 are RTX 2080 (8), RTX 3080 (10), and RTX 2080 Ti (11). The next catalog value is 12. Catalog rows below 22 are those three plus RTX 3080 Ti (12) and V100 16G (16). No catalog row is 22. The next catalog value is 24. Catalog rows below 32 are those plus A30 (24), RTX 3090 (24), RTX 4090 (24), and RTX 4090D (24). The next catalog value is 32. Catalog A100 40G is 40 and catalog A100 80G is 80. The notebook comment names A100 and 80 GiB. It does not print 40. Those catalog numbers are not the notebook’s measurement. This page did not run BAGEL and does not mark a row as enough. Which listing you can start is on Deploy.

The catalog template list had no BAGEL 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. The README’s environment block, copied. A conda environment is the first command: How to set up a conda environment on a cloud GPU.

git clone https://github.com/bytedance-seed/BAGEL.git
cd BAGEL
conda create -n bagel python=3.10 -y
conda activate bagel
pip install -r requirements.txt
pip install flash_attn==2.5.8 --no-build-isolation

requirements.txt pins torch==2.5.1, torchvision==0.20.1, transformers==4.49.0, and huggingface_hub==0.29.1. The flash_attn==2.5.8 line in that file is commented. The README installs that pin in the next command. The README block does not pass --index-url on the torch install. requirements.txt was commit f8819fc72647d4e565e8d560a3434db19dfb75c2, committed 2025-06-15T11:09:08Z. This page did not run pip.

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. This file pins torch==2.5.1 and the README does not pass a CUDA wheel index. This page did not re-test BAGEL on an RTX 5090. Catalog RTX 5090 and RTX 5090D are 32. That is the catalog number only.

Weights

The README’s download cell, copied. It writes the snapshot to models/BAGEL-7B-MoT. app.py defaults --model_path to that same directory.

from huggingface_hub import snapshot_download

save_dir = "models/BAGEL-7B-MoT"
repo_id = "ByteDance-Seed/BAGEL-7B-MoT"
cache_dir = save_dir + "/cache"

snapshot_download(cache_dir=cache_dir,
  local_dir=save_dir,
  repo_id=repo_id,
  local_dir_use_symlinks=False,
  resume_download=True,
  allow_patterns=["*.json", "*.safetensors", "*.bin", "*.py", "*.md", "*.txt"],
)

inference.ipynb assigns model_path = "/path/to/BAGEL-7B-MoT/weights" and the comment says to download from https://huggingface.co/ByteDance-Seed/BAGEL-7B-MoT. That path is not models/BAGEL-7B-MoT. This page does not edit the notebook. The README does not print a Jupyter launch line. Opening a notebook on the instance is How to run a Jupyter notebook on a cloud GPU.

Gradio

The three README commands, copied. app.py defaults --server_name to 127.0.0.1 and --server_port to 7860. These commands do not pass those flags, so the defaults apply. --zh is the Chinese-interface flag. --share exists and these commands do not pass it. Forward port 7860 with how to use SSH port forwarding on a cloud GPU.

python app.py
python app.py --mode 2 --zh
python app.py --mode 3

The image, edit, and understanding callbacks return values to Gradio components. This page found no save call that writes a named output image in app.py. The launch call, copied from the end of app.py:

demo.launch(
    server_name=args.server_name,
    server_port=args.server_port,
    share=args.share,
)

This page did not start the app. The README also prints bash scripts/train.sh and points at TRAIN.md and EVAL.md. This page does not copy the training or eval commands.

Notebook

The notebook’s image-generation call, copied. It calls display(output_dict['image']). It does not call save. The editing cell opens test_images/women.jpg and also calls display on the image in output_dict. This page did not run the cells.

inference_hyper=dict(
    cfg_text_scale=4.0,
    cfg_img_scale=1.0,
    cfg_interval=[0.4, 1.0],
    timestep_shift=3.0,
    num_timesteps=50,
    cfg_renorm_min=0.0,
    cfg_renorm_type="global",
)
prompt = "A female cosplayer portraying an ethereal fairy or elf, wearing a flowing dress made of delicate fabrics in soft, mystical colors like emerald green and silver. She has pointed ears, a gentle, enchanting expression, and her outfit is adorned with sparkling jewels and intricate patterns. The background is a magical forest with glowing plants, mystical creatures, and a serene atmosphere."
output_dict = inferencer(text=prompt, **inference_hyper)
display(output_dict['image'])
inference_hyper=dict(
    cfg_text_scale=4.0,
    cfg_img_scale=2.0,
    cfg_interval=[0.0, 1.0],
    timestep_shift=3.0,
    num_timesteps=50,
    cfg_renorm_min=0.0,
    cfg_renorm_type="text_channel",
)
image = Image.open('test_images/women.jpg')
prompt = 'She boards a modern subway, quietly reading a folded newspaper, wearing the same clothes.'
output_dict = inferencer(image=image, text=prompt, **inference_hyper)
display(output_dict['image'])

The README and the notebook both print the same hyperparameter notes: cfg_text_scale typical range 4.0–8.0, cfg_image_scale typical range 1.0–2.0, num_timesteps typical 50. The notebook’s generation dict uses cfg_img_scale, not cfg_image_scale. This page does not rename it. The note says that if edited images appear blurry, try global CFG-Renorm, decrease cfg_renorm_min, or decrease cfg_scale.

ComfyUI

The README news line dated May 26, 2025 thanks a contributor for neverbiasu/ComfyUI-BAGEL. This page does not copy that repository’s install. The ComfyUI examples top-level directory list on 2026-11-13 had no directory named bagel. 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.

When it fails

CUDA out of memory. The labels in the memory section are the ones the README and the notebook print. This page did not add a flag beyond those commands. 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.

flash_attn does not install. The README’s last install line is pip install flash_attn==2.5.8 --no-build-isolation. This page did not run it and does not name a second pin.

Save the image, then destroy

The notebook shows the image with display and does not write a filename. The Gradio app returns the image to the browser and this page found no named output file in app.py. Download that image before you destroy the instance. Weight offload uses offload from app.py and /tmp/offload from the notebook. Those folders are the offload arguments, not the image. 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 labels does the BAGEL README print?

The README says python app.py is for a 32GB+ VRAM GPU or multiple GPUs. It says python app.py --mode 2 --zh is for a 12~32GB VRAM GPU and recommends NF4. It says python app.py --mode 3 is for a 22~32GB VRAM GPU and that INT8 quantization is not recommended. The notebook sets max_mem_per_gpu to 40GiB and comments that on an A100, 80 GiB is sufficient to load on a single GPU. app.py passes max_memory of 80GiB per visible CUDA device to infer_auto_device_map. The smallest vram_gb in gpu-prices.json (updated_at 2026-11-13T14:01:30.465Z) is 8, on RTX 2080. This page did not run BAGEL and does not mark a row as enough. Which listing you can start is on https://cloudgpu.app/deploy.

Where does an image go?

The notebook generation and editing cells call display on the image in output_dict and do not call save. app.py returns images to Gradio Image components, and this page found no save to a named output file in app.py. The README snapshot writes weights to models/BAGEL-7B-MoT. app.py sets offload_folder to offload. The notebook sets offload_folder to /tmp/offload. Copy the image from the notebook or the browser before you destroy the instance. This page did not run the notebook or the app.

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

app.py defaults --server_name to 127.0.0.1 and --server_port to 7860. The README command python app.py does not pass those flags. The README thanks a contributor for neverbiasu/ComfyUI-BAGEL. This page does not copy that repository install. The ComfyUI examples top-level directory list on 2026-11-13 had no bagel directory. This page did not start the app.

Which license covers the code and the weights?

The README says BAGEL is licensed under the Apache 2.0. The repository LICENSE file is the Apache License, Version 2.0, and the appendix copyright line is the unfilled example. The notebook first cell says Copyright 2025 Bytedance Ltd. and/or its affiliates and SPDX-License-Identifier Apache-2.0. The GitHub license field on 2026-11-13 was Apache-2.0. The card ByteDance-Seed/BAGEL-7B-MoT had cardData.license apache-2.0 and gated false. Section 2 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)

  • BAGEL README (clone, conda, pip install -r requirements.txt, flash_attn==2.5.8, snapshot of ByteDance-Seed/BAGEL-7B-MoT, the three app.py commands, 32GB+ / 12~32GB / 22~32GB comments, Apache 2.0 line): https://github.com/ByteDance-Seed/Bagel/blob/main/README.md commit a53eea0b3e38748fb28d40deb5f1ea37fdcb8363. Repository HEAD a2fa77dd8caeefc41e6607ae0ec17408d3f4ee9f, committed 2026-05-04T17:01:02Z
  • requirements.txt (torch==2.5.1, torchvision==0.20.1, transformers==4.49.0, commented flash_attn==2.5.8): commit f8819fc72647d4e565e8d560a3434db19dfb75c2
  • app.py (--server_name 127.0.0.1, --server_port 7860, --mode default 1, --model_path models/BAGEL-7B-MoT, max_memory 80GiB, offload_folder offload): commit 2f7d107c366a0a6befc1de2376bd37af0a0ccc58
  • inference.ipynb (max_mem_per_gpu 40GiB, A100 80 GiB comment, model_path /path/to/BAGEL-7B-MoT/weights, offload_folder /tmp/offload, display(output_dict['image'])): commit 1f9297c9ce5357983555c078afbd04864bc3d99e
  • LICENSE (Apache 2.0, unfilled appendix copyright line): commit 5d85f732dde4bd6375b138365f341d09f5bf6337. GitHub license field Apache-2.0
  • Model card ByteDance-Seed/BAGEL-7B-MoT (cardData.license apache-2.0, gated false), read 2026-11-13
  • ComfyUI examples top-level directories (no bagel directory): https://github.com/comfyanonymous/ComfyUI_examples commit f9431bb000ce792094ff345446e22cac1ea6cef3
  • Public GPU memory: https://cloudgpu.app/gpu-prices.json (updated_at 2026-11-13T14:01:30.465Z) and https://cloudgpu.app/v1/public/gpu-catalog (generated_at 2026-11-13T14:01:31.438Z). GET /v1/public/compute-capabilities returned feature flags and no GPU list. The catalog had no BAGEL 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).