ByteDance-Seed/cryofm
Python
Captured source
source ↗ByteDance-Seed/cryofm
Description: Generative foundation model for cryo-EM density maps.
Language: Python
License: Apache-2.0
Stars: 32
Forks: 6
Open issues: 1
Created: 2025-12-16T06:14:01Z
Pushed: 2026-03-03T23:05:50Z
Default branch: main
Fork: no
Archived: no
README:
👋 Hi, everyone!
We are ByteDance Seed.
AI for Science · Structural Biology
A Generative Foundation Model for Cryo-Electron Microscopy
CryoFM: Cryo-EM Foundation Model
We are extremely delighted to release CryoFM, a flow-based foundation model for cryo-electron microscopy (cryo-EM) density maps. CryoFM represents a significant advancement in computational structural biology, leveraging state-of-the-art generative modeling techniques to learn deep prior of 3D cryo-EM densities. This foundation model opens up new possibilities for various downstream tasks in structural biology, including density map modification, enhancement, and analysis. We hope that CryoFM will serve as a powerful tool for the scientific community and accelerate discoveries in structural biology and drug design.
Resources
| Category | CryoFM2 | CryoFM1 | |----------|---------|---------| | Papers & Reports | | | | Model Weights | | | | User Guide | | |
Getting started (For end users)
Installation
CryoFM was developed and tested on Debian GNU/Linux 11 (bullseye). GPU is required; we have tested on both NVIDIA V100 and A100 GPUs. The installation usually takes a few minutes.
# Clone the repository git clone https://github.com/ByteDance-Seed/cryofm.git cd cryofm # Create a new conda environment for CryoFM (recommended) conda create -n cryofm python=3.10 -y conda activate cryofm # Install CryoFM pip install .
For detailed installation instructions and troubleshooting, see the Installation Guide.
Quick Start
CryoFM2 is recommended for most practical applications. It supports density map denoising, inpainting, and style enhancement.
CryoFM2 - Density Map Modification and Enhancement
CryoFM2 supports density map denoising, inpainting, anisotropy correction, and style enhancement.
Example: Denoising a density map
cfm denoise -i1 half_map_1.mrc -i2 half_map_2.mrc -o ./output \ --model-dir path/to/cryofm-v2/cryofm2-pretrain \ --op denoise --norm-grad --use-lamb-w
Example: Style enhancement
# EMhancer style cfm enhance -i input_map.mrc -o ./output_emhancer \ --model-dir path/to/cryofm-v2/cryofm2-emhancer --output-tag 1 # EMReady style cfm enhance -i input_map.mrc -o ./output_emready \ --model-dir path/to/cryofm-v2/cryofm2-emready --output-tag 0 --cfg-weight 0.5
As a reference, processing six 64³ patches with a batch size of 6 takes ~44 seconds on a single NVIDIA V100 GPU. Runtime scales with the input map size: larger maps are split into more patches and therefore take proportionally longer.
For more examples and advanced options, refer to the CryoFM2 Quick Start Guide.
Getting Started (For Developers)
This section provides a quick start guide for developers who wish to pretrain, fine-tune, or test CryoFM models. Please refer to the documentation for further details and customization.
CryoFM2
For unconditional generation, conditional generation, and likelihood control, see:
CryoFM1
For sampling and downstream tasks (denoising, anisotropy correction, missing wedge restoration), see:
---
For more details on data preparation, model customization, and advanced usage, please refer to the official documentation or contact the maintainers.
License
This project is licensed under the Apache License 2.0. See the [LICENSE](./LICENSE) file for details.
Citation
If you use CryoFM in your research, please cite the relevant paper(s):
CryoFM2:
@article{
Li2025.12.29.696802,
author={Li, Yilai and Yuan, Jing and Zhou, Yi and Wang, Zhenghua and Chen, Suyi and Yang, Fengyu and Ling, Haibin and Kovalsky, Shahar Z and Zheng, Xiaoqing and Gu, Quanquan},
title={A Generative Foundation Model for Cryo-EM Densities},
elocation-id={2025.12.29.696802},
year={2025},
doi={10.64898/2025.12.29.696802},
publisher={Cold Spring Harbor Laboratory},
URL={https://www.biorxiv.org/content/early/2025/12/29/2025.12.29.696802},
eprint={https://www.biorxiv.org/content/early/2025/12/29/2025.12.29.696802.full.pdf},
journal={bioRxiv}
}CryoFM1:
@inproceedings{
zhou2025cryofm,
title={Cryo{FM}: A Flow-based Foundation Model for Cryo-{EM} Densities},
author={Yi Zhou and Yilai Li and Jing Yuan and Quanquan Gu},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025},
url={https://openreview.net/forum?id=T4sMzjy7fO}
}About ByteDance Seed Team
Founded in 2023, ByteDance Seed Team is dedicated to crafting the industry's most advanced AI foundation models. The team aspires to become a world-class research team and make significant contributions to the advancement of science and society. You can get to know Bytedance Seed better through the following channels👇
Excerpt shown — open the source for the full document.
Notability
notability 3.0/10New repo by ByteDance, low traction.