Instructions to use nvidia/RFD4-Proteina-prep with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use nvidia/RFD4-Proteina-prep with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("nvidia/RFD4-Proteina-prep", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Commit History
10 days ago
-
Vendor the whole RFD4 datapipe instead of an inference-only fork
The `_cif` modules were a hand-curated inference subset of the RFD4 datapipe, which meant every release turned into archaeology: decide which differences were deliberate, which were drift, and which were someone re-wrapping a docstring. Upstream never had two pipelines -- its `build_design_validation_pipeline` is `build_design_train_pipeline(is_inference=True)` -- so the fork was maintaining a split the flag already made for us. The modules are now vendored unedited, training paths included, and `prepare_cif` calls the upstream builder rather than keeping its own transform list. Recorded divergences drop from 24 to 11, and all 11 are packaging rather than behaviour: the DDP logger becomes plain `logging`, and two data files are read from this package instead of a repository checkout. This lands two batches of behaviour change: * Reconciliation against native main. `canonical_polymer_ordering` now treats non-canonical amino acids as protein, so their backbone linkages carry an or…73d658a -
Use the checkpoint's own 147-token vocabulary, not AtomWorks' 34-token one
Verified signatureThe package read its residue vocabulary from atomworks.ml.encoding_definitions, which carries 34 tokens. The released checkpoints use the RFD4 repository's 147-token vocabulary, and PTR, SEP, NAG and MLY are absent from the AtomWorks one. Glycans and non-canonical residues were therefore unrepresentable: they fell through to atomized or unknown, and the decoder - which restricts residue classes by token type - was handed the wrong vocabulary. On a release whose point is that it handles them. Vendors the RFD4 repository's encoding module and the vocabulary it reads, and points the five import sites at it. TokenType and the residue groupings now derive from that vocabulary rather than from hand-written lists. Three further sites assumed the smaller vocabulary and are corrected to match the RFD4 datapipe: the atom37 slot table was built from a hardcoded 33-residue list, the slot lookup was gated to protein/RNA/DNA so a non-canonical residue's atoms resolved to -1 and were rejected as un…6e30fce -
Support the unified 147-class release: atomworks 3.0.3, chirality frames, encoder features
Verified signaturePins atomworks[ml]==3.0.3 and migrates AnnotateCovalentModifications to its API, matching the RFD4 inference datapipe (reassign_modified_residue=False, atomize_modified_residue=False). A pin bump alone fails: the 3.0.1 signature this package called no longer exists. Adds the features the unified checkpoint needs. AddChiralityFeature and the chirals helper are replaced with the RFD4 repository's current versions, which emit chiral_frame_atoms, chiral_slot_owner and tetrahedral_vertices and cover E/Z double-bond stereochemistry; without them noise_align_chirality cannot run. ground_truth_element and incident_bond_type_counts are added for the autoencoder encoder, which partial diffusion and inverse folding go through. Re-pins every vendored module to RFD4-Proteina 63ae4ff0cc26 (they recorded 0e05aece) and adds tools/check_vendored.py, which reports when a vendored source moves upstream. Verified against the previous behaviour: all 675 previously emitted tensors are bit-identical acros…38584dd
13 days ago
-
Add the annotated-CIF preparation and export package for the Diffusers RFD4-Proteina pipeline
Verified signature75b53c6