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
2 days ago
-
Point maintainer instructions at the public RosettaCommons/RFD4-Proteina repository
Verified signature7a3e236 -
Compare --check against what regeneration would actually write
`vendor_from_main.py --check` compared the shipped `_cif/` tree against the raw module closure. The write path does not write that closure: it skips the three SHIM_ONLY modules, whose logging is substituted rather than vendored, and writes its own `__init__.py`. So every single run reported three modules as pending and two as unexpected, on a tree that was exactly right. A check that cries wolf on a clean tree is worse than no check, because the one run that has something real to say looks like all the others. It now compares against the set `--out` would write, names `cath_mapping.py` as built from packaged data rather than from a source module, says so when there is nothing to report, and exits non-zero when there is. It is still a file-set check: a module whose contents moved upstream looks clean to it. MAINTAINING.md now says that, and keeps `--out` plus `diff -r` as the check that reads contents. Verified both ways: clean against main at f5db9617f, and exit 1 with both lists po…4f0ab1e
3 days ago
-
Take RFD4 5248e9a1, fix a stale vocabulary, require AtomWorks 3.0.4
The vendored modules are re-stamped to RFD4 5248e9a15a18. Across those ten upstream commits not one vendored module changed, so the only thing in the copy that moved is its provenance header. What did move is package data nothing was checking. RFD4 gave the `UNK` row of the checkpoint vocabulary a backbone -- "N CA C - O" where this package still shipped an empty row -- in "filter backbone-capable UNK before refolding" (#740). `resources/aa_rna_dna_glycan_ncaa.yaml` is copied verbatim from the RFD4 repository but is not a module, so it carries no provenance commit and the coverage guard could not see it. check_vendored.py now compares it byte for byte through a VERBATIM_DATA table, which a tamper test exercises. That gap is worth stating plainly: a UNK residue was being featurized with no atom37 slots at all, where upstream gives it four. None of the ten snapshot inputs contains a UNK residue, so the feature snapshot reported no change -- the one real change in this release was invis…82eed95
4 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 -
Type glycans and non-canonical residues, and drop the deprecated AtomWorks call
Verified signatureTokenType carried only five members while the RFD4 repository has seven, and nothing ever assigned GLYCAN or NCAA. A glycan or non-canonical residue was therefore typed as protein, unknown or atomized, which hands the decoder the wrong per-token-type residue restriction - on a release whose point is that it handles them. Ports the two assignments from datapipes/bonds.py along with the 13 glycan and 100 NCAA residue names. Replaces get_annotation_2d_categories() with get_annotation_categories(n_body=2) at the two call sites that still used it, matching main and silencing the DeprecationWarning AtomWorks 3.0.3 emits on every run. check_vendored.py now compares vendored content against the source by default, rather than only comparing the recorded commit against the current one. The pin check cannot catch a header that was updated without the content being reconciled, which is how the above slipped through. Output-neutral on the nine example inputs: all 720 tensors bit-identical. Glyca…77832f5 -
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