GigaTIME: virtual multiplex immunofluorescence from H&E slides, and what the repository actually ships
GigaTIME: Multimodal AI generates virtual population for tumor microenvironment modeling (Cell)
At a glance
- What is it?
- GigaTIME is a Microsoft Research cross-modal translator that predicts spatial proteomics from routine H&E pathology patches. The repository is a research release with Apache-2.0 code, gated model weights, and an explicit ban on clinical use.
- Who is it for?
- Adopt GigaTIME if you are a computational pathology researcher who needs paired H&E and mIF patches for method development and can accept gated weights, a CUDA-specific conda environment, and an Apache-2.0 code release whose model card forbids clinical or deployed use. Do not adopt it if you need a diagnostic or patient-facing output, or if you cannot agree to the HuggingFace terms.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 39 days ago.
- What is it written in?
- Mainly Jupyter Notebook, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The gap GigaTIME fills: mIF panels are scarce, H&E slides are not
Multiplex immunofluorescence gives you per-cell spatial proteomics, which is what tumor microenvironment studies want. It is also expensive, panel-limited, and available for a small fraction of the slides that exist. Hematoxylin and eosin slides are the opposite: routine, abundant, and cheap. GigaTIME is built on that asymmetry. The README describes it as a cross-modal translator that generates virtual mIF profiles from routine H&E pathology slides, and the intended use is stated narrowly: future research on pathology AI models, plus reproducibility of the paper's experiments. The audience is therefore not a pathology department. It is a machine learning researcher who has H&E tiles and wants a proteomic-style readout without staining for it, or who wants to reproduce and extend the Cell paper. Anyone looking for a triage tool or a clinical readout is in the wrong repository, and the README says so directly.
Cross-modal translation: what the architecture and data flow imply
The training entry point is scripts/db_train.py with --arch gigatime, which tells you the model is one architecture selected by a flag inside a shared training harness rather than a bespoke script. The flags describe the pipeline. --tiling_dir points at pre-tiled data, --window_size 256 and --input_h 512 --input_w 512 set the spatial scale, and --metadata takes a metadata file, so the dataset is expected to arrive already tiled and indexed. The loss is BCEDiceLoss, which is a segmentation-style objective rather than a regression on intensities, and it is the single strongest hint about what the network is doing: predicting per-channel masks over a patch. --sampling_prob and --val_sampling_prob control how much of the dataset is drawn per epoch. Multi-GPU is explicit via --gpu_ids 0 1 2 3 4 5 6 7, so the reference configuration assumes eight devices. The README does not document the encoder, the number of output channels, or the patch-level aggregation strategy, so treat the architecture as something you read out of the code, not the documentation. The newer GigaTIME-Flash is a different lineage: the README states it is built on top of GigaPath-Flash and reports better prediction quality, 6x faster inference and 8x less GPU memory than the original CNN-based GigaTIME.
Getting it running: conda, a gated model, and the token error you will hit
The environment is conda-first. conda env create -f environment.yml creates an environment named gigatime, activated with conda activate gigatime. The README states the codebase was tested with Python 3.11 on A100 GPUs and warns that the torch version in environment.yml must match your GPU and CUDA driver before you create the environment. That warning is the practical bottleneck: this is not a pip install and go project. Data comes as 50 paired H&E and mIF patches from the test set, downloaded from Dropbox and unpacked with unzip sample_test_data.zip -d ./data/, with the extracted folder required to sit under ./data/. Weights are gated. You must agree to the terms, then export HF_TOKEN=<huggingface read-only token>. The README names the failure you get without it: ValueError: We have no connection or you passed local_files_only, so force_download is not an accepted option. Loading is a snapshot_download of prov-gigatime/GigaTIME followed by torch.load on model.pth and load_state_dict. Three notebooks carry the workflows: scripts/gigatime_testing.ipynb for patch inference, scripts/gigatime_flash_testing.ipynb for the Flash model, and scripts/gigatime_flash_tcga_wsi_inference.ipynb, which tiles a full TCGA slide, runs Flash, and stitches a slide-level virtual mIF map across all channels. scripts/gigatime_training.ipynb is a one-epoch demo, not a reproduction recipe.
Where it breaks: gated weights, CUDA coupling, and a training script that assumes a cluster
Three constraints are visible without running anything. First, access is conditional. The weights require agreeing to terms and holding a HuggingFace read-only token, so an air-gapped environment or an automated CI job cannot pull them without a mirror you manage yourself. Second, the environment is pinned to a GPU stack. The README ties reproducibility to A100s and tells you to reconcile the torch pin with your driver before creating the environment; on a different accelerator or a newer driver, expect to edit environment.yml rather than file a bug. Third, the training command is written for a multi-GPU node. Eight GPU ids, batch size 32, 300 epochs, input 512x512 and num_workers 12 describe a cluster job. A single-GPU user can change --gpu_ids to 0, but nothing in the README indicates what batch size or learning rate survives that change. Finally, the evaluation surface is small: 50 paired patches. That is enough to sanity-check a checkpoint, not enough to characterise behaviour across scanners, staining protocols or tissue types, and no such characterisation is published in the README.
The alternative worth comparing: train a supervised mIF model on your own pairs
The obvious comparison is not another foundation model, it is doing this the ordinary way: collect paired H&E and mIF slides, train a supervised segmentation model on that cohort, and accept the labelling cost. The difference is where the generalisation comes from. GigaTIME is pretrained on a large corpus and shipped as a checkpoint, so you inherit whatever cross-institution behaviour the pretraining bought, and you spend nothing on staining. A locally trained model inherits your scanner, your panel and your staining protocol, which usually makes it more accurate inside that narrow distribution and useless outside it. The trade is cost and control against generality. If your question is about one cohort and one panel, the local model is often the cheaper answer. If you have H&E and no mIF at all, GigaTIME is one of the few options that produces a proteomic-style output from what you already have. Note that the repository also positions GigaTIME-Flash against the original GigaTIME on the same axis, with the README claiming 6x faster inference and 8x less GPU memory, so even within this project you are choosing between a heavier original and a lighter successor.
Maintenance, upgrades and what Apache-2.0 does and does not cover
There are no releases retrieved for this repository, so there is no versioned upgrade path and no changelog to diff against. The default branch is main and the last push is dated 2026-08-07, which means you track the branch or pin a commit hash yourself. The model family table lists Apache-2.0 for GigaPath, GigaPath-Flash, GigaTIME and GigaTIME-Flash, so the code and the listed checkpoints share one licence identifier. That is where the clarity ends. The README's License Notice states the model is not intended or made available for clinical use as a medical device, clinical support, diagnostic tool, or other technology intended to be used in that capacity, and the Model Uses section marks any deployed use case, commercial or otherwise, as out of scope. An Apache-2.0 grant and a model card that forbids deployed use are two different instruments, and the repository does not reconcile them for you. This is not legal advice: if you plan to use the weights in a product, read both the licence file and the model card, and get your own answer on which controls what.
Who should adopt GigaTIME, and what to check before you do
Adopt it if you are doing computational pathology research, you want virtual mIF from H&E, and you can work inside the stated scope: research on pathology AI models and reproduction of the paper. The 50-patch sample set plus the testing notebook is a reasonable first hour of work, and the Flash path with the TCGA whole-slide notebook is the more interesting one if slide-level maps are your goal. Skip it if you need clinical decision support, if you cannot accept gated weights and a token in your pipeline, or if your hardware is not a recent NVIDIA GPU. The honest summary is that this is a research artifact with a narrow licence, a small public evaluation set, and a training script tuned for an eight-GPU node. Check three things first: that environment.yml resolves against your driver, that HF_TOKEN is exported in the shell that launches the notebook, and that your intended output stays inside the research scope rather than the out-of-scope deployed category.
Editorial conclusion
Adopt GigaTIME if you are a computational pathology researcher who needs paired H&E and mIF patches for method development and can accept gated weights, a CUDA-specific conda environment, and an Apache-2.0 code release whose model card forbids clinical or deployed use. Do not adopt it if you need a diagnostic or patient-facing output, or if you cannot agree to the HuggingFace terms. Before committing, verify three things: that your CUDA driver matches the torch pin in environment.yml, that your HF_TOKEN is exported in the shell that runs the notebook, and that your intended use falls inside the stated research scope rather than the out-of-scope deployed category.
Community notes