ByteDance-Seed / ByteDance-Seed/Bagel

Guide to install and run Bagel on Windows 11 with RTX 5090 32GB Vram

Open
#92 15 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
6.2k
Forks
545
PR merge metrics
No merged PRs in 30d

Description

This was done on Windows 11, RTX 5090 32 GB Vram, Nvidia Driver 576.52

Follow the guide carefully step by step:

**1)** Download Bagel repository (lets assume it's "_Bagel_" folder on your PC) and remove
flash_attn==2.5.8, torch==2.5.1, torchvision==0.20.1 from "requirements.txt" file inside "**Bagel**" folder

**2)** Download everything from [https://huggingface.co/ByteDance-Seed/BAGEL-7B-MoT/tree/main](https://huggingface.co/ByteDance-Seed/BAGEL-7B-MoT/tree/main)
Of course main file is "ema.safetensors", 29.2 GB
Put all files into "_\Bagel\models\BAGEL-7B-MoT\_" , create all subfolders if needed

**2)** Install miniconda. Start "Anaconda Prompt" from Start, all next commands must be typed there:

`conda create -n BagelEnv python=3.10`

**3)** `conda activate BagelEnv`

### All next commands must be with BagelEnv enviroment being active

**4)** Install Cuda Toolkit 12.8 and cudnn into BagelEnv miniconda enviroment, non system wide, to avoid conflicts with
other projects:

`conda install cuda=12.8 cudnn -c nvidia -c conda-forge`

**5)** `pip install torch==2.7.0+cu128 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128`

**6)** `pip install -r requirements.txt`

**7)** a) download "flash_attn-2.7.4.post1%2Bcu128torch2.8.0cxx11abiTRUE-cp310-cp310-win_amd64.whl" from [https://huggingface.co/lldacing/flash-attention-windows-wheel/tree/f1d19914b4b710823709e11e2a88d052216a110b](https://huggingface.co/lldacing/flash-attention-windows-wheel/tree/f1d19914b4b710823709e11e2a88d052216a110b)

`pip install flash_attn-2.7.4.post1%2Bcu128torch2.8.0cxx11abiTRUE-cp310-cp310-win_amd64.whl`

It successfully worked for me even though it's for Torch 2.8.0 and we've installed 2.7.0

OR

b) Later @petermg released wheel for torch 2.7.0, so you can instead download it:

"flash_attn-2.7.4.post1+cu128.torch270-cp310-cp310-win_amd64.whl" from [https://github.com/petermg/flash_attn_windows/releases/tag/01](https://github.com/petermg/flash_attn_windows/releases/tag/01)

`pip install flash_attn-2.7.4.post1+cu128.torch270-cp310-cp310-win_amd64.whl`

**8)** `pip install gradio`

**9)** To start Bagel, still inside "Anaconda Prompt" and with active BagelEnv enviroment, change folder to "_Bagel_"
repository you downloaded in step 1) then:

`python app.py`

I got next output in console:
--------------------------------

The safetensors archive passed at models/BAGEL-7B-MoT\ema.safetensors does not contain metadata. Make sure to save your model with the `save_pretrained` method. Defaulting to 'pt' metadata.
* Running on local URL: http://127.0.0.1:7860
* To create a public link, set `share=True` in `launch()`.
---------------------------------

Then browser started and Bagel UI appeared, everything works fine. CPU is not utilized much but 5090 is
under 95-100% load during image generation, editing, understanding. VRAM is almost full, like 30-30.5 GB used.
Image generation and editing takes around 55-65 seconds, image understanding takes about 0.5-5 seconds depending on
image size.

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the Windows 11 installation steps against requirements.txt and the app.py entry point, including the listed Python, CUDA, flash-attention, and model files. Confirm which commands still work, then document the verified setup and successful launch output in the repository's existing documentation location.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.