Fusion Anything: A Generalized Multimodal Foundation Model
Paper β’ 2609.22107 β’ Published
How to use FusionAnything/FAMv1 with TabPFN:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
This repository hosts the pretrained model checkpoint (FAM.pt) for Fusion Anything: A Generalized Multimodal Foundation Model.
FAM is a multimodal foundation model that uses in-context-learning to solve multimodal prediction tasks in a forward pass. Inference code can be found at https://github.com/huizi-Cui/Fusion_Anything_Model.
fit stores labeled Context samples without updating model weights; predict_proba / predict performs inference on unlabeled Query samples).[n_samples, n_features] with aligned sample rows (no NaN or Inf values).0 (all target classes must appear in the Context set).For tasks with more than 10 classes, one feasible approach is to decompose them into smaller classification tasks.git clone https://github.com/huizi-Cui/Fusion_Anything_Model.git
cd Fusion_Anything_Model
# Install PyTorch with CUDA support (adjust cu128 for your CUDA version)
pip install torch==2.9.0 torchvision==0.24.0 --index-url https://download.pytorch.org/whl/cu128
# Install Fusion Anything
pip install -e .
huggingface-cli download FusionAnything/FAMv1 FAM.pt --local-dir checkpoints
Alternatively, place FAM.pt anywhere and set FAM_CHECKPOINT=/path/to/FAM.pt or pass checkpoint="/path/to/FAM.pt" to FusionAnythingClassifier.
import numpy as np
from fusion_anything import FusionAnythingClassifier
# Each modality is a finite 2D array of shape [n_samples, n_features]
context = {
"image": np.load("context_image.npy"),
"tabular": np.load("context_tabular.npy"),
}
labels = np.load("context_labels.npy") # 1D integer array, 0..K-1 (2 <= K <= 10)
query = {
"image": np.load("test_image.npy"),
"tabular": np.load("test_tabular.npy"),
}
model = FusionAnythingClassifier(device="cuda:0", preprocessing="pca")
model.fit(context, labels, structured_modalities=["tabular"])
probabilities = model.predict_proba(query) # shape: [n_query, n_classes]
predictions = model.classes_[probabilities.argmax(axis=1)]
This repo is Built with PriorLabs-TabPFN (PriorLabs/TabPFN, subject to the Prior Labs License). We thank the Prior Labs researchers for generously sharing their insights, model weights, data, and code.
@article{cui2026fusion,
title={Fusion Anything: A Generalized Multimodal Foundation Model},
author={Cui, Huizi and Han, Zongbo and Ding, Chenggong and Xiao, Naichuan and Yang, Jialong and Chen, Jingdong and Wang, Guangyu and Hu, Qinghua and Zhang, Changqing},
journal={arXiv preprint arXiv:2609.22107},
year={2026}
}